-
Notifications
You must be signed in to change notification settings - Fork 3
ContextMenu
Back to home | Back to Reference | View raw text
A popup menu that can display items specific to the context it's invoked by, with a visual style that matches the rest of the Solid Shine UI controls.
flowchart LR
classDef interfaceStyle stroke-dasharray: 5 5;
classDef abstractStyle stroke-width:4px
subgraph SolidShineUi
SolidShineUi.ContextMenu[[ContextMenu]]
end
subgraph System.Windows.Controls
System.Windows.Controls.ContextMenu[[ContextMenu]]
end
System.Windows.Controls.ContextMenu --> SolidShineUi.ContextMenu
Type | Name | Methods |
---|---|---|
Brush |
BorderBrush Get or set the brush used for the border of the menu's drop-down area. |
get, set |
Brush |
CheckedBrush Get or set the brush to use for the check highlight for checked menu items. |
get, set |
ColorScheme |
ColorScheme Get or set the color scheme used for this control. The color scheme can quickly apply a whole visual style to your control. |
get, set |
Brush |
DisabledBrush Get or set the brush used for the foreground/text of a child menu item when it is disabled. |
get, set |
Brush |
HighlightBrush Get or set the brush used for the top-level menu items in the menu bar. This is not used in a ContextMenu; instead look at the HighlightSubitemBrush property. |
get, set |
Brush |
HighlightSubitemBrush Get or set the brush used for menu items that aren't top-level on the menu bar, when the mouse is over them or they have keyboard focus. |
get, set |
Brush |
MenuBackground Get or set the brush used for the background of the menu's drop-down area. This is different from the Background brush, which is not used in a ContextMenu. |
get, set |
bool |
RoundedCorners Get or set if the context menu has rounded corners. When true, each corner has a corner radius of 4. |
get, set |
ScrollBarVisibility |
VerticalScrollBarVisibility Get or set if a vertical scroll bar is visible for the context menu. If the context menu is longer than the screen, the scroll bar can be used. |
get, set |
Returns | Name |
---|---|
void |
OnColorSchemeChanged (DependencyObject d, DependencyPropertyChangedEventArgs e)Perform an action when the ColorScheme property has changed. Primarily used internally. |
Returns | Name |
---|---|
void |
ApplyColorScheme (... )Apply a color scheme to this control. The color scheme can quickly apply a whole visual style to the control. |
A popup menu that can display items specific to the context it's invoked by, with a visual style that matches the rest of the Solid Shine UI controls.
ContextMenu
public ContextMenu()
public static void OnColorSchemeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
Type | Name | Description |
---|---|---|
DependencyObject |
d | The object containing the property that changed. |
DependencyPropertyChangedEventArgs |
e | Event arguments about the property change. |
Perform an action when the ColorScheme property has changed. Primarily used internally.
public void ApplyColorScheme(ColorScheme cs)
Type | Name | Description |
---|---|---|
ColorScheme |
cs | The color scheme to apply. |
Apply a color scheme to this control. The color scheme can quickly apply a whole visual style to the control.
public void ApplyColorScheme(HighContrastOption hco)
Type | Name | Description |
---|---|---|
HighContrastOption |
hco | The high-contrast color scheme to apply. |
Apply a color scheme to this control. The color scheme can quickly apply a whole visual style to the control.
public ColorScheme ColorScheme { get; set; }
Get or set the color scheme used for this control. The color scheme can quickly apply a whole visual style to your control.
public Brush MenuBackground { get; set; }
Get or set the brush used for the background of the menu's drop-down area. This is different from the Background brush, which is not used in a ContextMenu.
public Brush DisabledBrush { get; set; }
Get or set the brush used for the foreground/text of a child menu item when it is disabled.
public Brush BorderBrush { get; set; }
Get or set the brush used for the border of the menu's drop-down area.
public Brush HighlightBrush { get; set; }
Get or set the brush used for the top-level menu items in the menu bar. This is not used in a ContextMenu; instead look at the HighlightSubitemBrush property.
public Brush HighlightSubitemBrush { get; set; }
Get or set the brush used for menu items that aren't top-level on the menu bar, when the mouse is over them or they have keyboard focus.
public Brush CheckedBrush { get; set; }
Get or set the brush to use for the check highlight for checked menu items.
public bool RoundedCorners { get; set; }
Get or set if the context menu has rounded corners. When true, each corner has a corner radius of 4.
public ScrollBarVisibility VerticalScrollBarVisibility { get; set; }
Get or set if a vertical scroll bar is visible for the context menu. If the context menu is longer than the screen, the scroll bar can be used.
public event DependencyPropertyChangedEventHandler ColorSchemeChanged
Raised when the ColorScheme property is changed.
Generated with ModularDoc