Toolbar Elements > Toolbar SplitButton |
C1ToolbarSplitButton control represents a drop-down split button on the C1ToobarStrip.
It's similar to C1ToolbarDropDown but contains two clickable areas: the button area and the downward-pointing arrow.
When clicking on the rightmost part of the downward-pointing rectangle it displays a popup panel with the Content property or context menu set by the ContextMenu property. Clicking on the left part of button fires the Click event as in the standard button. Usually the Click event is used to perform the default or last action while the popup allows to select alternative options.
A solid vertical line dividing the image from the drop down arrow appears when you hover the cursor over the button like in the following image:
EX: Split button with popup menu
XAML |
Copy Code
|
---|---|
<c1:C1ToolbarSplitButton Padding="2" Header="Defaut" Click="SetDefaultStyle"> <c1:C1ToolbarDropDown.Menu> <c1:C1ContextMenu> <c1:C1MenuItem Header="Heading 1" FontSize="14" /> <c1:C1MenuItem Header="Heading 2" FontSize="12" /> <c1:C1MenuItem Header="Title" FontWeight="Bold" /> <c1:C1MenuItem Header="Subtitle" FontWeight="SemiBold" FontStyle="Italic" /> <c1:C1MenuItem Header="Quote" FontStyle="Italic" /> </c1:C1ContextMenu> </c1:C1ToolbarDropDown.Menu> </c1:C1ToolbarSplitButton> |