In This Article

BarSplitButton Class

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

public class BarSplitButton : BarPopupButton, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IAddChild, IGeneratorHost, IContainItemStorage, ICommandSource, IPopupAnchor, IVariantSizeItem, ISupportsCoerceKeyTipText, ISupportsCoerceLabel
Inheritance:
System.Object System.Windows.Threading.DispatcherObject System.Windows.DependencyObject System.Windows.Media.Visual System.Windows.UIElement System.Windows.FrameworkElement System.Windows.Controls.Control System.Windows.Controls.ItemsControl System.Windows.Controls.Primitives.MenuBase System.Windows.Controls.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

System.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

System.Boolean:

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 System.Windows.RoutedEventArgs

The System.Windows.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

System.Windows.Automation.Peers.AutomationPeer:

The type-specific System.Windows.Automation.Peers.AutomationPeer implementation.

OnLostKeyboardFocus(KeyboardFocusChangedEventArgs)

Invoked when an unhandled 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 System.Windows.Input.KeyboardFocusChangedEventArgs

The System.Windows.Input.KeyboardFocusChangedEventArgs that contains event data.

OnLostMouseCapture(MouseEventArgs)

Invoked when an unhandled 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 System.Windows.Input.MouseEventArgs

The System.Windows.Input.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 System.Windows.Input.MouseButtonEventArgs

The System.Windows.Input.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 System.Windows.Input.MouseButtonEventArgs

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

Events

Click

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

public event RoutedEventHandler Click

Event Type

System.Windows.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

Extension Methods