Skip to content

KrissKrossCool/wpf-toolbar-dropdown

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 

Repository files navigation

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>

About

Dropdown Button for the WPF ToolBar

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%