ContextToolbarMenuButton Class
A ContextToolbarControl menu button.
Namespace: DevExpress.WinUI.Ribbon
Assembly: DevExpress.WinUI.Ribbon.v21.1.dll
Declaration
[Bindable]
[ContentProperty(Name = "Items")]
public class ContextToolbarMenuButton :
RibbonMenuButtonBase<IContextToolbarItem>,
IContextToolbarItem,
IFlyoutItem,
IRibbonItemBase,
IVisualItem
Remarks
The following code sample displays a ContextToolbarControl with a ContextToolbarMenuButton and three ContextToolbarButtons in a RibbonToolbarControl:
<Ribbon:RibbonToolbarControl Width="400">
<Ribbon:RibbonToolbarTab Caption="Page Layout" >
<Ribbon:RibbonToolbarGroup Caption="Sheet Options">
<Ribbon:RibbonToolbarButton Content="Button" />
</Ribbon:RibbonToolbarGroup>
</Ribbon:RibbonToolbarTab>
<Ribbon:RibbonToolbarControl.Content>
<StackPanel x:Name="Content">
<Ribbon:ContextToolbarControl Target="{Binding ElementName=Content}" Orientation="Vertical">
<Ribbon:ContextToolbarGroup>
<Ribbon:ContextToolbarMenuButton Content="Pictures" ItemStyle="Glyph" Orientation="Vertical">
<Ribbon:ContextToolbarMenuButton.Icon>
<SymbolIcon Symbol="Pictures"/>
</Ribbon:ContextToolbarMenuButton.Icon>
<Ribbon:ContextToolbarButton Content="This Device..." >
<Ribbon:ContextToolbarButton.Icon>
<SymbolIcon Symbol="Folder"/>
</Ribbon:ContextToolbarButton.Icon>
</Ribbon:ContextToolbarButton>
<Ribbon:ContextToolbarButton Content="Stock Images...">
<Ribbon:ContextToolbarButton.Icon>
<SymbolIcon Symbol="BrowsePhotos"/>
</Ribbon:ContextToolbarButton.Icon>
</Ribbon:ContextToolbarButton>
<Ribbon:ContextToolbarButton Content="Online Pictures..." >
<Ribbon:ContextToolbarButton.Icon>
<SymbolIcon Symbol="Globe"/>
</Ribbon:ContextToolbarButton.Icon>
</Ribbon:ContextToolbarButton>
</Ribbon:ContextToolbarMenuButton>
<Ribbon:ContextToolbarButton Content="Cut"/>
<Ribbon:ContextToolbarButton Content="Copy"/>
<Ribbon:ContextToolbarButton Content="Paste"/>
</Ribbon:ContextToolbarGroup>
</Ribbon:ContextToolbarControl>
<Button Width="400" Height="100" />
</StackPanel>
</Ribbon:RibbonToolbarControl.Content>
</Ribbon:RibbonToolbarControl>
Button Icon
You can use the following properties to display and customize a RibbonToolbarMenuButton icon:
Property | Description |
---|---|
Icon | Gets or sets a RibbonToolbarMenuButton IconElement. |
IconSource | Gets or sets a RibbonToolbarMenuButton icon source object. |
IconTemplate | Gets or sets a RibbonToolbarMenuButton icon template. |
TemplateSelector | Gets or sets a RibbonToolbarMenuButton icon template selector. |
IconWidth | Gets or sets a RibbonToolbarMenuButton icon width. |
IconHeight | Gets or sets a RibbonToolbarMenuButton icon height. |
Customize Appearance
You can use the following properties to customize the RibbonToolbarMenuButton appearance:
Property | Description |
---|---|
Background | Gets or sets a RibbonToolbarMenuButton unfocused state background. |
BorderBrush | Gets or sets a RibbonToolbarMenuButton unfocused state border brush. |
BorderThickness | Gets or sets a RibbonToolbarMenuButton unfocused border thickness. |
Foreground | Gets or sets a RibbonToolbarMenuButton unfocused state foreground. |
Height | Gets or sets a RibbonToolbarMenuButton height. |
Margin | Gets or sets a RibbonToolbarMenuButton margin. |
Opacity | Gets or sets RibbonToolbarMenuButton opacity. |
ToolTipService.ToolTip | Gets or sets a RibbonToolbarMenuButton tooltip. |
ToolTipService.Placement | Gets or sets a RibbonToolbarMenuButton tooltip position. |
Visibility | Gets or sets RibbonToolbarMenuButton visibility. |
Width | Gets or sets a RibbonToolbarMenuButton width. |
Inheritance
Object
DependencyObject
UIElement
FrameworkElement
Control
ContentControl
DevExpress.WinUI.Controls.Core.Internal.ContentControlEx
DevExpress.WinUI.Controls.Core.Internal.PointerItemBase
DevExpress.WinUI.Controls.Core.Internal.GlyphItemBase
DevExpress.WinUI.Ribbon.Internal.RibbonItemBase
DevExpress.WinUI.Ribbon.Internal.RibbonItemBaseEx
DevExpress.WinUI.Ribbon.Internal.RibbonMenuItemBase
DevExpress.WinUI.Ribbon.Internal.RibbonMenuButtonBase
DevExpress.WinUI.Ribbon.Internal.RibbonMenuButtonBase<DevExpress.WinUI.Ribbon.IContextToolbarItem>
ContextToolbarMenuButton
See Also