In This Article

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 is true.

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