DropDownButton

The control is made up of two buttons side by side. The First button works as a regular button and the second one will display a customizable drop down menu under the control.

Inherits from Catel.Windows.Controls.UserControl.

DropDownButton 01

Properties

Property nameDescription
AccentColorBrushGets or sets accent color.
ArrowLocationGets or sets arrow location (Left, Top, Right or Bottom).
ArrowMarginGets or sets arrow margin.
CommandGets or sets the command to execute when the button itself is clicked.
DropDownGets or sets the drop down content (e.g. context menu).
EnableTransparentBackgroundGets or sets whether transparency enabled.
HeaderGets or sets button caption.
ShowDefaultButtonGets or sets whether arrow button has default view.

How to use

Specify Header and DropDown. If you need to handle button click itself bind to Command property.

<orc:DropDownButton Header="Action" Command="{Binding DefaultAction}">
	<orc:DropDownButton.DropDown>
		<ContextMenu>
			<MenuItem Header="Item 1"/>
			<MenuItem Header="Item 2"/>
			<Separator/>
			<MenuItem Header="Item 2"/>
		</ContextMenu>
	</orc:DropDownButton.DropDown>
</orc:DropDownButton>

Have a question about Catel or WildGums controls? Use StackOverflow with the Catel tag!


Discussion