Dropdown Button for the WPF ToolBar
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
DropdownButton.cs
LICENSE
README.md

README.md

Dropdown Button for WPF ToolBar

Example Dropdown Button

Add

Add the CS file to the WPF project. The default namespace is System.Windows.Controls.Extensions.

Use

To use the button in XAML, add the namespace at first to your Window or UserControl.

<Window xmlns:ext="clr-namespace:System.Windows.Controls.Extensions">

Add the Dropdown Button to the ToolBar. The DropdownMenu property defines the ContextMenu that will be shown on click.

<ToolBarTray>
    <ToolBar>
        <ext:DropdownButton>
            <ext:DropdownButton.Content>
                My Dropdown Button
            </ext:DropdownButton.Content>
            <ext:DropdownButton.DropdownMenu>
                <ContextMenu>
                    <MenuItem Header="Item 1" />
                    <MenuItem Header="Item 2" />
                </ContextMenu>
            </ext:DropdownButton.DropdownMenu>
        </ext:DropdownButton>
    </ToolBar>
</ToolBarTray>