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

BarSplitButtonItemLink Class

Represents a link to a BarSplitButtonItem object.

Namespace: DevExpress.Xpf.Bars

Assembly: DevExpress.Xpf.Core.v20.2.dll

NuGet Packages: DevExpress.WindowsDesktop.Wpf.Core, DevExpress.Wpf.Core

Declaration

Remarks

See Items and Links to learn more.

Example

This example creates a BarSplitButtonItem (a button with drop-down). Click the button’s Down Arrow to display a popup window. To add a custom popup content, use the PopupControlContainer as the PopupControl. To add other bar items, use the PopupMenu.

In XAML

 <dxb:BarContainerControl>
    <dxb:ToolBarControl UseWholeRow="True">
        <dxb:BarSplitButtonItem Name="btnFontColor" Content="FontColor"  ItemClick="btnFontColor_ItemClick"
                                ArrowAlignment="Bottom" Glyph="{dx:DXImage Image=ChangeFontStyle_16x16.png}">
            <dxb:BarSplitButtonItem.PopupControl>
                <dxb:PopupControlContainer>
                    <UserControl>
                        <dxe:ColorChooser/>
                    </UserControl>
                </dxb:PopupControlContainer>
            </dxb:BarSplitButtonItem.PopupControl>
        </dxb:BarSplitButtonItem>
    </dxb:ToolBarControl>
</dxb:BarContainerControl>

In Code-Behind

private void btnFontColor_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e) {
    PopupControlContainer pcc = (e.Item as DevExpress.Xpf.Bars.BarSplitButtonItem).PopupControl as PopupControlContainer;
    Color color = ((pcc.Content as UserControl).Content as ColorChooser).Color;
    MessageBox.Show("Color is applied: " + color.ToString());
}

E1567

View Example

The following code snippets (auto-collected from DevExpress Examples) contain references to the BarSplitButtonItemLink class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

Implements

See Also