In This Article

RibbonApplicationButton Class

Represents an application button (e.g. 'File' tab) control for a ActiproSoftware.Windows.Controls.Bars.RibbonApplicationButton.Ribbon.

public class RibbonApplicationButton : BarPopupButtonBase, IPopupAnchor
Inheritance:
object Visual UIElement FrameworkElement Control ItemsControl MenuBase Menu BarPopupButtonBase object
Implements:
IPopupAnchor

Constructors

RibbonApplicationButton()

Initializes an instance of the class.

public RibbonApplicationButton()

Properties

Content

The content to display in the button.

public object? Content { get; set; }

Property Value

object

ContentFontSize

The font size of the button's content, which is generally its label.

public double ContentFontSize { get; set; }

Property Value

double

ContentTemplate

The DataTemplate to use for displaying the content.

public DataTemplate? ContentTemplate { get; set; }

Property Value

DataTemplate

ContentTemplateSelector

The DataTemplateSelector to use for displaying the content.

public DataTemplateSelector? ContentTemplateSelector { get; set; }

Property Value

DataTemplateSelector

HasContent

Indicates whether there is Content available.

public bool HasContent { get; }

Property Value

bool:

true if there is Content available; otherwise, false.

HasMenuAdditionalContent

Indicates whether there is MenuAdditionalContent available.

public bool HasMenuAdditionalContent { get; }

Property Value

bool:

true if there is MenuAdditionalContent available; otherwise, false.

HasMenuFooter

Indicates whether there is a MenuFooter available.

public bool HasMenuFooter { get; }

Property Value

bool:

true if there is a MenuFooter available; otherwise, false.

MenuAdditionalContent

The content to display to the right of the menu.

public object? MenuAdditionalContent { get; set; }

Property Value

object

MenuAdditionalContentTemplate

The DataTemplate to use for displaying the menu additional content.

public DataTemplate? MenuAdditionalContentTemplate { get; set; }

Property Value

DataTemplate

MenuAdditionalContentTemplateSelector

The DataTemplateSelector to use for displaying the menu additional content.

public DataTemplateSelector? MenuAdditionalContentTemplateSelector { get; set; }

Property Value

DataTemplateSelector

MenuFooter

The content to display to the footer of the menu.

public object? MenuFooter { get; set; }

Property Value

object

MenuFooterTemplate

The DataTemplate to use for displaying the menu footer content.

public DataTemplate? MenuFooterTemplate { get; set; }

Property Value

DataTemplate

MenuFooterTemplateSelector

The DataTemplateSelector to use for displaying the menu footer content.

public DataTemplateSelector? MenuFooterTemplateSelector { get; set; }

Property Value

DataTemplateSelector

Methods

OnContentChanged(object?, object?)

Occurs when the Content property value is changed.

protected virtual void OnContentChanged(object? oldValue, object? newValue)
Parameter Type Description
oldValue object

The old value.

newValue object

The new value.

OnContentTemplateChanged(DataTemplate?, DataTemplate?)

Occurs when the ContentTemplate property value is changed.

protected virtual void OnContentTemplateChanged(DataTemplate? oldValue, DataTemplate? newValue)
Parameter Type Description
oldValue DataTemplate

The old value.

newValue DataTemplate

The new value.

OnContentTemplateSelectorChanged(DataTemplateSelector?, DataTemplateSelector?)

Occurs when the ContentTemplateSelector property value is changed.

protected virtual void OnContentTemplateSelectorChanged(DataTemplateSelector? oldValue, DataTemplateSelector? newValue)
Parameter Type Description
oldValue DataTemplateSelector

The old value.

newValue DataTemplateSelector

The new value.

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.

OnIndicatorAreaMouseDown(MouseButtonEventArgs)

Occurs when a pointer button is pressed over the indicator area.

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

The MouseButtonEventArgs containing data related to this event.

OnKeyDown(KeyEventArgs)

Responds to the KeyDown event.

protected override void OnKeyDown(KeyEventArgs e)
Parameter Type Description
e KeyEventArgs

A KeyEventArgs that contains the event data.

OnKeyTipInvoked(KeyTipInvokedEventArgs)

Occurs when the control's key tip is invoked.

protected override void OnKeyTipInvoked(KeyTipInvokedEventArgs e)
Parameter Type Description
e KeyTipInvokedEventArgs

The KeyTipInvokedEventArgs containing data related to this event.

OnKeyTipOpening(KeyTipOpeningEventArgs)

Occurs when the control's key tip is opening.

protected override void OnKeyTipOpening(KeyTipOpeningEventArgs e)
Parameter Type Description
e KeyTipOpeningEventArgs

The KeyTipOpeningEventArgs containing data related to this event.

OnMenuAdditionalContentChanged(object?, object?)

Occurs when the MenuAdditionalContent property value is changed.

protected virtual void OnMenuAdditionalContentChanged(object? oldValue, object? newValue)
Parameter Type Description
oldValue object

The old value.

newValue object

The new value.

OnMenuAdditionalContentTemplateChanged(DataTemplate?, DataTemplate?)

Occurs when the MenuAdditionalContentTemplate property value is changed.

protected virtual void OnMenuAdditionalContentTemplateChanged(DataTemplate? oldValue, DataTemplate? newValue)
Parameter Type Description
oldValue DataTemplate

The old value.

newValue DataTemplate

The new value.

OnMenuAdditionalContentTemplateSelectorChanged(DataTemplateSelector?, DataTemplateSelector?)

Occurs when the MenuAdditionalContentTemplateSelector property value is changed.

protected virtual void OnMenuAdditionalContentTemplateSelectorChanged(DataTemplateSelector? oldValue, DataTemplateSelector? newValue)
Parameter Type Description
oldValue DataTemplateSelector

The old value.

newValue DataTemplateSelector

The new value.

OnMenuFooterChanged(object?, object?)

Occurs when the MenuFooter property value is changed.

protected virtual void OnMenuFooterChanged(object? oldValue, object? newValue)
Parameter Type Description
oldValue object

The old value.

newValue object

The new value.

OnMenuFooterTemplateChanged(DataTemplate?, DataTemplate?)

Occurs when the MenuFooterTemplate property value is changed.

protected virtual void OnMenuFooterTemplateChanged(DataTemplate? oldValue, DataTemplate? newValue)
Parameter Type Description
oldValue DataTemplate

The old value.

newValue DataTemplate

The new value.

OnMenuFooterTemplateSelectorChanged(DataTemplateSelector?, DataTemplateSelector?)

Occurs when the MenuFooterTemplateSelector property value is changed.

protected virtual void OnMenuFooterTemplateSelectorChanged(DataTemplateSelector? oldValue, DataTemplateSelector? newValue)
Parameter Type Description
oldValue DataTemplateSelector

The old value.

newValue DataTemplateSelector

The new value.

OnPopupOpening(CancelRoutedEventArgs)

Occurs before the IsPopupOpen property changes to true.

protected override void OnPopupOpening(CancelRoutedEventArgs e)
Parameter Type Description
e CancelRoutedEventArgs

The event data.

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.

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.

Fields

ContentFontSizeProperty

Defines the ContentFontSize property.

public static readonly DependencyProperty ContentFontSizeProperty

ContentProperty

Defines the Content property.

public static readonly DependencyProperty ContentProperty

ContentTemplateProperty

Defines the ContentTemplate property.

public static readonly DependencyProperty ContentTemplateProperty

ContentTemplateSelectorProperty

Defines the ContentTemplateSelector property.

public static readonly DependencyProperty ContentTemplateSelectorProperty

HasContentProperty

Defines the HasContent property.

public static readonly DependencyProperty HasContentProperty

HasMenuAdditionalContentProperty

Defines the HasMenuAdditionalContent property.

public static readonly DependencyProperty HasMenuAdditionalContentProperty

HasMenuFooterProperty

Defines the HasMenuFooter property.

public static readonly DependencyProperty HasMenuFooterProperty

MenuAdditionalContentProperty

Defines the MenuAdditionalContent property.

public static readonly DependencyProperty MenuAdditionalContentProperty

MenuAdditionalContentTemplateProperty

Defines the MenuAdditionalContentTemplate property.

public static readonly DependencyProperty MenuAdditionalContentTemplateProperty

MenuAdditionalContentTemplateSelectorProperty

public static readonly DependencyProperty MenuAdditionalContentTemplateSelectorProperty

MenuFooterProperty

Defines the MenuFooter property.

public static readonly DependencyProperty MenuFooterProperty

MenuFooterTemplateProperty

Defines the MenuFooterTemplate property.

public static readonly DependencyProperty MenuFooterTemplateProperty

MenuFooterTemplateSelectorProperty

Defines the MenuFooterTemplateSelector property.

public static readonly DependencyProperty MenuFooterTemplateSelectorProperty

Inherited Members

Extension Methods