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 istrue
.
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.
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
- BarPopupButton.CanCloneToRibbonQuickAccessToolBarProperty
- BarPopupButton.ImageSourceResolvedProperty
- BarPopupButton.KeyProperty
- BarPopupButton.LargeImageSourceProperty
- BarPopupButton.MediumImageSourceProperty
- BarPopupButton.PopupIndicatorMarginProperty
- BarPopupButton.ScreenTipFooterProperty
- BarPopupButton.ScreenTipHeaderProperty
- BarPopupButton.SmallImageSourceProperty
- BarPopupButton.TitleProperty
- BarPopupButton.ToolBarItemCollapseBehaviorProperty
- BarPopupButton.ToolBarItemVariantBehaviorProperty
- BarPopupButton.UserInterfaceDensityProperty
- BarPopupButton.VariantSizeProperty
- BarPopupButton.OnApplyTemplate()
- BarPopupButton.OnToolTipOpening(ToolTipEventArgs)
- BarPopupButton.ToString()
- BarPopupButton.CanCloneToRibbonQuickAccessToolBar
- BarPopupButton.ImageSourceResolved
- BarPopupButton.Key
- BarPopupButton.LargeImageSource
- BarPopupButton.MediumImageSource
- BarPopupButton.PopupIndicatorMargin
- BarPopupButton.ScreenTipFooter
- BarPopupButton.ScreenTipHeader
- BarPopupButton.SmallImageSource
- BarPopupButton.Title
- BarPopupButton.ToolBarItemCollapseBehavior
- BarPopupButton.ToolBarItemVariantBehavior
- BarPopupButton.UserInterfaceDensity
- BarPopupButton.VariantSize
- BarPopupButtonBase.PopupClosedEvent
- BarPopupButtonBase.PopupOpenedEvent
- BarPopupButtonBase.PopupOpeningEvent
- BarPopupButtonBase.CanEffectivelyExecuteProperty
- BarPopupButtonBase.CanEffectivelyOpenPopupProperty
- BarPopupButtonBase.CommandProperty
- BarPopupButtonBase.CommandParameterProperty
- BarPopupButtonBase.CommandTargetProperty
- BarPopupButtonBase.CornerRadiusProperty
- BarPopupButtonBase.HasDropShadowProperty
- BarPopupButtonBase.HasLabelProperty
- BarPopupButtonBase.IsPopupOpenProperty
- BarPopupButtonBase.IsPressedProperty
- BarPopupButtonBase.KeyTipTextProperty
- BarPopupButtonBase.LabelProperty
- BarPopupButtonBase.ParentGalleryMinWidthProperty
- BarPopupButtonBase.PopupAnimationProperty
- BarPopupButtonBase.PopupBackgroundProperty
- BarPopupButtonBase.PopupBorderBrushProperty
- BarPopupButtonBase.PopupBorderThicknessProperty
- BarPopupButtonBase.PopupCornerRadiusProperty
- BarPopupButtonBase.PopupHorizontalOffsetProperty
- BarPopupButtonBase.PopupIndicatorTemplateProperty
- BarPopupButtonBase.PopupOpeningCommandProperty
- BarPopupButtonBase.PopupPaddingProperty
- BarPopupButtonBase.PopupVerticalOffsetProperty
- BarPopupButtonBase.ClearContainerForItemOverride(DependencyObject, object)
- BarPopupButtonBase.GetContainerForItemOverride()
- BarPopupButtonBase.HandleMouseButton(MouseButtonEventArgs)
- BarPopupButtonBase.IsItemItsOwnContainerOverride(object)
- BarPopupButtonBase.IsOverButtonArea(MouseEventArgs)
- BarPopupButtonBase.OnIndicatorAreaMouseDown(MouseButtonEventArgs)
- BarPopupButtonBase.OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)
- BarPopupButtonBase.OnKeyDown(KeyEventArgs)
- BarPopupButtonBase.OnKeyTipInvoked(KeyTipInvokedEventArgs)
- BarPopupButtonBase.OnKeyTipOpening(KeyTipOpeningEventArgs)
- BarPopupButtonBase.OnPopupClosed(RoutedEventArgs)
- BarPopupButtonBase.OnPopupOpened(RoutedEventArgs)
- BarPopupButtonBase.OnPopupOpening(CancelRoutedEventArgs)
- BarPopupButtonBase.OnPreviewKeyUp(KeyEventArgs)
- BarPopupButtonBase.PrepareContainerForItemOverride(DependencyObject, object)
- BarPopupButtonBase.SetFocusForIndicatorAreaMouseDown()
- BarPopupButtonBase.UpdatePopupPlacement()
- BarPopupButtonBase.CanEffectivelyExecute
- BarPopupButtonBase.CanEffectivelyOpenPopup
- BarPopupButtonBase.CanFocusSelectedGalleryItemOnPopupOpen
- BarPopupButtonBase.Command
- BarPopupButtonBase.CommandParameter
- BarPopupButtonBase.CommandTarget
- BarPopupButtonBase.CornerRadius
- BarPopupButtonBase.HasDropShadow
- BarPopupButtonBase.HasLabel
- BarPopupButtonBase.IsEnabledCore
- BarPopupButtonBase.IsPopupOpen
- BarPopupButtonBase.IsPressed
- BarPopupButtonBase.KeyTipText
- BarPopupButtonBase.Label
- BarPopupButtonBase.ParentGalleryMinWidth
- BarPopupButtonBase.PopupAnimation
- BarPopupButtonBase.PopupBackground
- BarPopupButtonBase.PopupBorderBrush
- BarPopupButtonBase.PopupBorderThickness
- BarPopupButtonBase.PopupCornerRadius
- BarPopupButtonBase.PopupHorizontalOffset
- BarPopupButtonBase.PopupIndicatorTemplate
- BarPopupButtonBase.PopupOpeningCommand
- BarPopupButtonBase.PopupPadding
- BarPopupButtonBase.PopupVerticalOffset
- BarPopupButtonBase.PopupClosed
- BarPopupButtonBase.PopupOpened
- BarPopupButtonBase.PopupOpening