In This Article

BarSplitButton Class

Represents a split button control, for use within a ribbon or toolbar.

public class BarSplitButton : BarPopupButton, IPopupAnchor
Inheritance:
object Visual UIElement FrameworkElement Control ItemsControl MenuBase Menu BarPopupButtonBase BarPopupButton object
Derived:
BarSplitToggleButton
Implements:
IPopupAnchor

Constructors

BarSplitButton()

Initializes a new instance of the BarSplitButton class.

public BarSplitButton()

Properties

InputGestureText

Gets or sets the input gesture text to display in menu items and screen tips, which overrides any auto-generated input gesture text from the Command.

[Localizability(LocalizationCategory.Label)]
public string InputGestureText { get; set; }

Property Value

string:

The input gesture text to display in menu items and screen tips.

IsInputGestureTextVisible

Gets or sets whether the input gesture text is allowed to be visible in the user interface.

public bool IsInputGestureTextVisible { get; set; }

Property Value

bool:

true if the input gesture text is allowed to be visible in the user interface; otherwise, false. The default value is true.

Methods

ExecuteClickFromKeyboard()

Executes a click event generated by a keyboard action.

protected override void ExecuteClickFromKeyboard()

OnClick(RoutedEventArgs)

Occurs when the button is clicked in an area outside of the popup indicator area.

protected override void OnClick(RoutedEventArgs e)
Parameter Type Description
e RoutedEventArgs

The RoutedEventArgs containing data related to this event.

Remarks

This method has no default implementation. Because an intermediate class in the inheritance might implement this method, we recommend that you call the base implementation in your implementation.

OnCreateAutomationPeer()

Provides an appropriate MenuAutomationPeer implementation for this control, as part of the WPF automation infrastructure.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer:

The type-specific AutomationPeer implementation.

OnLostKeyboardFocus(KeyboardFocusChangedEventArgs)

Invoked when an unhandled System.Windows.Input.Keyboard.LostKeyboardFocus attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

protected override void OnLostKeyboardFocus(KeyboardFocusChangedEventArgs e)
Parameter Type Description
e KeyboardFocusChangedEventArgs

The KeyboardFocusChangedEventArgs that contains event data.

OnLostMouseCapture(MouseEventArgs)

Invoked when an unhandled System.Windows.Input.Mouse.LostMouseCapture attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

protected override void OnLostMouseCapture(MouseEventArgs e)
Parameter Type Description
e MouseEventArgs

The MouseEventArgs that contains event data.

OnPreviewMouseLeftButtonDown(MouseButtonEventArgs)

Invoked when an unhandled PreviewMouseLeftButtonDown routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

protected override void OnPreviewMouseLeftButtonDown(MouseButtonEventArgs e)
Parameter Type Description
e MouseButtonEventArgs

The MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was pressed.

OnPreviewMouseLeftButtonUp(MouseButtonEventArgs)

Invoked when an unhandled PreviewMouseLeftButtonUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

protected override void OnPreviewMouseLeftButtonUp(MouseButtonEventArgs e)
Parameter Type Description
e MouseButtonEventArgs

The MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was released.

UpdateEnabledProperties()

Updates the CanEffectivelyExecute and CanEffectivelyOpenPopup properties.

protected override void UpdateEnabledProperties()

Events

Click

Occurs when the button is clicked in an area outside of the popup indicator area.

public event RoutedEventHandler Click

Event Type

RoutedEventHandler

Fields

ClickEvent

Identifies the Click routed event. This field is read-only.

public static readonly RoutedEvent ClickEvent

InputGestureTextProperty

Identifies the InputGestureText dependency property. This field is read-only.

public static readonly DependencyProperty InputGestureTextProperty

IsInputGestureTextVisibleProperty

Identifies the IsInputGestureTextVisible dependency property. This field is read-only.

public static readonly DependencyProperty IsInputGestureTextVisibleProperty

Inherited Members