-
Notifications
You must be signed in to change notification settings - Fork 3
MenuButton
Back to home | Back to Reference | View raw text
A flat-styled button that displays a menu when it is clicked.
flowchart LR
classDef interfaceStyle stroke-dasharray: 5 5;
classDef abstractStyle stroke-width:4px
subgraph SolidShineUi
SolidShineUi.MenuButton[[MenuButton]]
SolidShineUi.FlatButton[[FlatButton]]
end
SolidShineUi.FlatButton --> SolidShineUi.MenuButton
Type | Name | Methods |
---|---|---|
bool |
KeepMenuArrowOnRight Get or set if the arrow should be kept to the right side of the button, even if the content of the button is left or center aligned. |
get, set |
ContextMenu |
Menu Get or set the menu that appears when the button is clicked. |
get, set |
PlacementMode |
MenuPlacement Get or set the placement mode for the MenuButton's menu. |
get, set |
Rect |
MenuPlacementRectangle Get or set the placement rectangle for the MenuButton's menu. This sets the area relative to the button that the menu is positioned. |
get, set |
bool |
ShowMenuArrow Get or set if an arrow should be shown to the right of the button content to indicate the button as a menu button. |
get, set |
bool |
StaysOpen Get or set if the menu should close automatically. Remember to set the StaysOpenOnClick property for child menu items as well. |
get, set |
Returns | Name |
---|---|
void |
ApplyColorScheme (... )Apply a color scheme to this control, and set some other optional appearance settings. The color scheme can quickly apply a whole visual style to the control. |
A flat-styled button that displays a menu when it is clicked.
public MenuButton()
Create a new MenuButton.
public void ApplyColorScheme(ColorScheme cs, bool transparentBack, bool useAccentColors)
Type | Name | Description |
---|---|---|
ColorScheme |
cs | The color scheme to apply |
bool |
transparentBack | Set if the button should have no background when not focused or highlighted. This can also be achieved with the TransparentBack property. |
bool |
useAccentColors | Set if accent colors should be used for this button, rather than the main color scheme colors. This can also be achieved with the UseAccentColors property. |
Apply a color scheme to this control, and set some other optional appearance settings. The color scheme can quickly apply a whole visual style to the control.
public void ApplyColorScheme(HighContrastOption hco, bool transparentBack)
Type | Name | Description |
---|---|---|
HighContrastOption |
hco | The high-contrast color scheme to apply. |
bool |
transparentBack | Set if the button should have no background when not focused or highlighted. This can also be achieved with the TransparentBack property. |
Apply a color scheme to this control. The color scheme can quickly apply a whole visual style to the control.
public ContextMenu Menu { get; set; }
Get or set the menu that appears when the button is clicked.
public PlacementMode MenuPlacement { get; set; }
Get or set the placement mode for the MenuButton's menu.
public Rect MenuPlacementRectangle { get; set; }
Get or set the placement rectangle for the MenuButton's menu. This sets the area relative to the button that the menu is positioned.
public bool StaysOpen { get; set; }
Get or set if the menu should close automatically. Remember to set the StaysOpenOnClick
property for child menu items as well.
public bool ShowMenuArrow { get; set; }
Get or set if an arrow should be shown to the right of the button content to indicate the button as a menu button.
public bool KeepMenuArrowOnRight { get; set; }
Get or set if the arrow should be kept to the right side of the button, even if the content of the button is left or center aligned.
Generated with ModularDoc