-
Notifications
You must be signed in to change notification settings - Fork 7
ModernStandardWindowContextMenu
HO-COOH edited this page Mar 22, 2026
·
2 revisions
| Name | IsDependencyProperty | Description |
|---|---|---|
Window |
❌ |
Microsoft.UI.Xaml.Window property. |
A modern XAML-based window context menu to replace the traditional win32 menu when you right-click the window titlebar.
It supports uses on both Essential:WindowEx and a normal Microsoft.UI.Xaml.Window.
The icons are hard-coded glyphs so you get the same appearance on both Windows 10 & Windows 11.
It also listens to window style changes, so it shows the correct menu item in whatever window styles your window have.
- To use with a
essential:Window, simply set it toWindowEx.ContextMenu
<essential:WindowEx ...
<essential:WindowEx.ContextMenu>
<!-- Simply set it to WindowEx.ContextMenu -->
<essential:ModernStandardWindowContextMenu />
</essential:WindowEx.ContextMenu>
</essential:WindowEx>- To use with a
Microsoft.UI.Xaml.Window, declare it as aResourcewith ax:Nameand{x:Bind}toModernStandardWindowContextMenu.Windowproperty under the first element in the window context
<Window ...>
<StackPanel>
<StackPanel.Resources>
<!-- Simply declare it as resource in your first control of the window -->
<essential:ModernStandardWindowContextMenu x:Name="Menu" Window="{x:Bind}" />
</StackPanel.Resources>
</StackPanel>
</Window>