SplitButton Events
This article describes the SplitButton events:
OnClick
The OnClick event fires when the user clicks or taps the primary button or a secondary button. Each SplitButton action can execute a separate OnClick handler.
- The event argument type is
MouseEventArgs. - The event handler can be synchronous (
void) or asynchronous (async Task).
OnClose
The OnClose event fires before the SplitButton popup closes. Set the IsCancelled property of the SplitButtonCloseEventArgs argument to true to keep the popup open.
The event fires for user interaction and when calling CloseAsync(). It does not fire when the popup is already closed.
OnOpen
The OnOpen event fires before the SplitButton popup opens. Set the IsCancelled property of the SplitButtonOpenEventArgs argument to true to keep the popup closed.
The event fires for user interaction and when calling OpenAsync(). It does not fire when the popup is already open.
Example
Handling the SplitButton events