Skip to main content
A newer version of this page is available.

ContextToolbarButton Class

A ContextToolbarControl‘s regular button.

Namespace: DevExpress.WinUI.Ribbon

Assembly: DevExpress.WinUI.Ribbon.v21.1.dll

Declaration

public class ContextToolbarButton :
    RibbonButtonItemBase,
    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>

RibbonToolbarControl - ContextPanel Example

Inheritance

Show 12 items
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.RibbonButtonItemBase
ContextToolbarButton
See Also