Skip to content
JaykeBird edited this page Feb 21, 2023 · 5 revisions

Back to home | Back to Reference | View raw text

Menu class

Description

A menu control that can display and organize commands within various drop-down elements. This differs from the WPF menu with a visual style that matches other Solid Shine UI controls.

Diagram

  flowchart LR
  classDef interfaceStyle stroke-dasharray: 5 5;
  classDef abstractStyle stroke-width:4px
  subgraph SolidShineUi
  SolidShineUi.Menu[[Menu]]
  end
  subgraph System.Windows.Controls
System.Windows.Controls.Menu[[Menu]]
  end
System.Windows.Controls.Menu --> SolidShineUi.Menu
Loading

Members

Properties

Public properties

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 of menu items that are disabled.
get, set
Brush HighlightBrush
Get or set the brush used for the top-level menu items in the menu bar, when the mouse is over them or they have keyboard focus.
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 set the background of the top menu bar.
get, set

Methods

Public Static methods

Returns Name
void OnColorSchemeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)

Public methods

Returns Name
void ApplyColorScheme(...)
Apply a color scheme to this control. The color scheme can quickly apply a whole visual style to the control.

Details

Summary

A menu control that can display and organize commands within various drop-down elements. This differs from the WPF menu with a visual style that matches other Solid Shine UI controls.

Inheritance

  • Menu

Constructors

Menu

public Menu()

Methods

OnColorSchemeChanged

public static void OnColorSchemeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
Arguments
Type Name Description
DependencyObject d
DependencyPropertyChangedEventArgs e

ApplyColorScheme [1/2]

public void ApplyColorScheme(ColorScheme cs)
Arguments
Type Name Description
ColorScheme cs The color scheme to apply.
Summary

Apply a color scheme to this control. The color scheme can quickly apply a whole visual style to the control.

ApplyColorScheme [2/2]

public void ApplyColorScheme(HighContrastOption hco)
Arguments
Type Name Description
HighContrastOption hco The high-contrast color scheme to apply.
Summary

Apply a color scheme to this control. The color scheme can quickly apply a whole visual style to the control.

Properties

ColorScheme

public ColorScheme ColorScheme { get; set; }
Summary

Get or set the color scheme used for this control. The color scheme can quickly apply a whole visual style to your control.

MenuBackground

public Brush MenuBackground { get; set; }
Summary

Get or set the brush used for the background of the menu's drop-down area. This is different from the Background brush, which set the background of the top menu bar.

DisabledBrush

public Brush DisabledBrush { get; set; }
Summary

Get or set the brush used for the foreground of menu items that are disabled.

BorderBrush

public Brush BorderBrush { get; set; }
Summary

Get or set the brush used for the border of the menu's drop-down area.

HighlightBrush

public Brush HighlightBrush { get; set; }
Summary

Get or set the brush used for the top-level menu items in the menu bar, when the mouse is over them or they have keyboard focus.

HighlightSubitemBrush

public Brush HighlightSubitemBrush { get; set; }
Summary

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.

CheckedBrush

public Brush CheckedBrush { get; set; }
Summary

Get or set the brush to use for the check highlight for checked menu items.

Events

ColorSchemeChanged

public event DependencyPropertyChangedEventHandler ColorSchemeChanged
Summary

Raised when the ColorScheme property is changed.

Generated with ModularDoc

Clone this wiki locally