Skip to main content

SplitButton

Description​

Use SplitButton when there is one default action plus alternate actions in the flyout.

SplitButton in light mode SplitButton in dark mode

Open flyout​

SplitButton with its alternate actions open in light mode SplitButton with its alternate actions open in dark mode

Example usage​

<fluence:SplitButton Content="Save" Command="{Binding SaveCommand}">
<fluence:SplitButton.Flyout>
<StackPanel>
<fluence:Button Content="Save as" Command="{Binding SaveAsCommand}" />
<fluence:Button Content="Export" Command="{Binding ExportCommand}" />
</StackPanel>
</fluence:SplitButton.Flyout>
</fluence:SplitButton>

The main region invokes SaveCommand; bind the alternate commands on the page's data context.

var action = new Fluence.Wpf.Controls.SplitButton { Content = "Save" };

Key properties​

PropertyDefaultPurpose
AppearanceStandardSets the visual emphasis.
CommandnullCommand invoked by the primary action.
CommandParameternullParameter passed to the command.
FlyoutnullContent shown by the secondary action.
CornerRadius4Rounds the main surface.
DropdownCornerRadius8Rounds the flyout surface.

State and behavior​

The main region performs the default action while the arrow opens alternate actions.

Events​

Click is raised for the primary action.

Reference​