ApplicationButton Class
Represents the ribbon application button control.
public class ApplicationButton : PopupButton, IKeyTipTarget, ILogicalParent, IVariantControl
- Inheritance:
- object Visual UIElement FrameworkElement Control ControlBase ButtonBase PopupButtonBase PopupButton object
- Implements:
- IKeyTipTarget ILogicalParent IVariantControl
Constructors
ApplicationButton()
Initializes the ApplicationButton
class.
public ApplicationButton()
Properties
IsPopupEnabled
Gets or sets whether allow popups for this button. Popups are disabled for Backstage view.
public bool IsPopupEnabled { get; }
Property Value
- bool:
true
if popups are enabled for this button; otherwise,false
. The default value istrue
.
Methods
OnAccessKey(AccessKeyEventArgs)
Responds when the access key for this control is invoked.
protected override void OnAccessKey(AccessKeyEventArgs e)
Parameter | Type | Description |
---|---|---|
e | AccessKeyEventArgs | A AccessKeyEventArgs that contains the event data. |
OnApplyTemplate()
Invoked whenever application code or internal processes call ApplyTemplate().
public override void OnApplyTemplate()
OnKeyTipAccessed(string)
Called when key tip access text for the control is typed by the end user.
protected override bool OnKeyTipAccessed(string keyTipAccessText)
Parameter | Type | Description |
---|---|---|
keyTipAccessText | string | The key tip access text that was typed. |
Returns
- bool:
true
if an action was executed that should stop key tip mode; otherwise,false
.
Remarks
Implementations of this method should either execute the action associated with the control or move focus to the control so that the end user can take further action such as in a menu.
OnMouseLeftButtonDown(MouseButtonEventArgs)
Invoked when an unhandled MouseLeftButtonDown attached event is raised on this element. Implement this method to add class handling for this event.
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Parameter | Type | Description |
---|---|---|
e | MouseButtonEventArgs | A MouseButtonEventArgs that contains the event data. |
OnPopupClosed()
Raises the PopupClosed event.
protected override void OnPopupClosed()
OnPopupOpened()
Raises the PopupOpened event.
protected override void OnPopupOpened()
OnPopupOpening()
Raises the PopupOpeningEvent.
protected override bool OnPopupOpening()
Returns
- bool:
true
if the popup opening should be allowed to open; otherwise,false
.
OnRenderSizeChanged(SizeChangedInfo)
Called when the rendered size of a control changes.
protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
Parameter | Type | Description |
---|---|---|
sizeInfo | SizeChangedInfo | Specifies the size changes. |
Fields
IsPopupEnabledProperty
Identifies the IsPopupEnabled dependency property. This field is read-only.
public static readonly DependencyProperty IsPopupEnabledProperty
Inherited Members
- PopupButton.OnClick(ExecuteRoutedEventArgs)
- PopupButton.OnContextChanged(ControlContext, ControlContext)
- PopupButton.OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)
- PopupButton.OnMouseLeftButtonUp(MouseButtonEventArgs)
- PopupButton.OnPreviewClick(ExecuteRoutedEventArgs)
- PopupButton.OnPropertyChanged(DependencyPropertyChangedEventArgs)
- PopupButton.OnVariantSizeChanged(VariantSize, VariantSize)
- PopupButton.UpdateCanExecute()
- PopupButtonBase.PopupClosedEvent
- PopupButtonBase.PopupOpenedEvent
- PopupButtonBase.PopupOpeningEvent
- PopupButtonBase.AutoDisableWhenPopupContentIsDisabledProperty
- PopupButtonBase.CustomPopupPlacementCallbackProperty
- PopupButtonBase.IsPopupOpenProperty
- PopupButtonBase.PopupContentProperty
- PopupButtonBase.PopupContentTemplateProperty
- PopupButtonBase.PopupContentTemplateSelectorProperty
- PopupButtonBase.PopupHasBorderProperty
- PopupButtonBase.PopupHorizontalOffsetProperty
- PopupButtonBase.PopupPlacementProperty
- PopupButtonBase.PopupPlacementRectangleProperty
- PopupButtonBase.PopupPlacementTargetProperty
- PopupButtonBase.PopupResizeModeProperty
- PopupButtonBase.PopupVerticalOffsetProperty
- PopupButtonBase.OnLostMouseCapture(MouseEventArgs)
- PopupButtonBase.OnVisualParentChanged(DependencyObject)
- PopupButtonBase.AutoDisableWhenPopupContentIsDisabled
- PopupButtonBase.CustomPopupPlacementCallback
- PopupButtonBase.IsPopupOpen
- PopupButtonBase.LogicalChildren
- PopupButtonBase.PopupContent
- PopupButtonBase.PopupContentTemplate
- PopupButtonBase.PopupContentTemplateSelector
- PopupButtonBase.PopupHasBorder
- PopupButtonBase.PopupHorizontalOffset
- PopupButtonBase.PopupPlacement
- PopupButtonBase.PopupPlacementRectangle
- PopupButtonBase.PopupPlacementTarget
- PopupButtonBase.PopupResizeMode
- PopupButtonBase.PopupVerticalOffset
- PopupButtonBase.PopupClosed
- PopupButtonBase.PopupOpened
- PopupButtonBase.PopupOpening
- ButtonBase.CheckedEvent
- ButtonBase.IndeterminateEvent
- ButtonBase.UncheckedEvent
- ButtonBase.ClickModeProperty
- ButtonBase.HasPopupProperty
- ButtonBase.ImageSourceSmallSizeProperty
- ButtonBase.InputGestureTextProperty
- ButtonBase.IsCheckedProperty
- ButtonBase.IsPointerOverProperty
- ButtonBase.IsPressedProperty
- ButtonBase.MenuItemDescriptionProperty
- ButtonBase.StaysOpenOnClickProperty
- ButtonBase.MeasureOverride(Size)
- ButtonBase.OnChecked()
- ButtonBase.OnCommandChanged(ICommand, ICommand)
- ButtonBase.OnCreateAutomationPeer()
- ButtonBase.OnIndeterminate()
- ButtonBase.OnKeyDown(KeyEventArgs)
- ButtonBase.OnKeyUp(KeyEventArgs)
- ButtonBase.OnLostKeyboardFocus(KeyboardFocusChangedEventArgs)
- ButtonBase.OnMouseEnter(MouseEventArgs)
- ButtonBase.OnMouseLeave(MouseEventArgs)
- ButtonBase.OnMouseMove(MouseEventArgs)
- ButtonBase.OnScreenTipOpening(RoutedEventArgs)
- ButtonBase.OnTouchLeave(TouchEventArgs)
- ButtonBase.OnUnchecked()
- ButtonBase.ClickMode
- ButtonBase.HasPopup
- ButtonBase.IsChecked
- ButtonBase.ImageSourceSmallSize
- ButtonBase.InputGestureText
- ButtonBase.IsEnabledCore
- ButtonBase.IsPointerOver
- ButtonBase.IsPressed
- ButtonBase.MenuItemDescription
- ButtonBase.StaysOpenOnClick
- ButtonBase.Checked
- ButtonBase.Indeterminate
- ButtonBase.Unchecked
- ControlBase.ClickEvent
- ControlBase.PreviewClickEvent
- ControlBase.ScreenTipClosingEvent
- ControlBase.ScreenTipOpeningEvent
- ControlBase.CommandProperty
- ControlBase.CommandParameterProperty
- ControlBase.CommandTargetProperty
- ControlBase.ContextProperty
- ControlBase.HasImageProperty
- ControlBase.HasLabelProperty
- ControlBase.IdProperty
- ControlBase.ImageSourceLargeProperty
- ControlBase.ImageSourceSmallProperty
- ControlBase.IsHighlightedProperty
- ControlBase.KeyTipAccessTextProperty
- ControlBase.LabelProperty
- ControlBase.ScreenTipDescriptionProperty
- ControlBase.ScreenTipFooterProperty
- ControlBase.ScreenTipHeaderProperty
- ControlBase.ScreenTipHelpUriProperty
- ControlBase.ScreenTipImageSourceProperty
- ControlBase.VariantSizeProperty
- ControlBase.CoerceCommandParameter(DependencyObject, object)
- ControlBase.OnScreenTipClosing(RoutedEventArgs)
- ControlBase.RaiseClickEvent(ExecuteRoutedEventArgs)
- ControlBase.ToString()
- ControlBase.CanUpdateCanExecuteWhenHidden
- ControlBase.Command
- ControlBase.CommandParameter
- ControlBase.CommandTarget
- ControlBase.Context
- ControlBase.HasImage
- ControlBase.HasLabel
- ControlBase.Id
- ControlBase.ImageSourceLarge
- ControlBase.ImageSourceSmall
- ControlBase.IsHighlighted
- ControlBase.KeyTipAccessText
- ControlBase.Label
- ControlBase.ScreenTipDescription
- ControlBase.ScreenTipFooter
- ControlBase.ScreenTipHeader
- ControlBase.ScreenTipHelpUri
- ControlBase.ScreenTipImageSource
- ControlBase.VariantSize
- ControlBase.Click
- ControlBase.PreviewClick
- ControlBase.ScreenTipClosing
- ControlBase.ScreenTipOpening