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 a new instance of the RibbonApplicationButton class.

public RibbonApplicationButton()

Properties

Content

Gets or sets the content to display in the button.

public object Content { get; set; }

Property Value

object:

The content to display in the button.

ContentFontSize

Gets or sets the font size of the button's content, which is generally its label.

public double ContentFontSize { get; set; }

Property Value

double:

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

ContentTemplate

Gets or sets the DataTemplate to use for displaying the content.

public DataTemplate ContentTemplate { get; set; }

Property Value

DataTemplate:

The DataTemplate to use for displaying the content.

ContentTemplateSelector

Gets or sets the DataTemplateSelector to use for displaying the content.

public DataTemplateSelector ContentTemplateSelector { get; set; }

Property Value

DataTemplateSelector:

The DataTemplateSelector to use for displaying the content.

HasContent

Gets whether there is Content available.

public bool HasContent { get; }

Property Value

bool:

true if there is Content available; otherwise, false.

HasMenuAdditionalContent

Gets whether there is MenuAdditionalContent available.

public bool HasMenuAdditionalContent { get; }

Property Value

bool:

true if there is MenuAdditionalContent available; otherwise, false.

HasMenuFooter

Gets whether there is a MenuFooter available.

public bool HasMenuFooter { get; }

Property Value

bool:

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

MenuAdditionalContent

Gets or sets the content to display to the right of the menu.

public object MenuAdditionalContent { get; set; }

Property Value

object:

The content to display to the right of the menu.

MenuAdditionalContentTemplate

Gets or sets the DataTemplate to use for displaying the menu additional content.

public DataTemplate MenuAdditionalContentTemplate { get; set; }

Property Value

DataTemplate:

The DataTemplate to use for displaying the menu additional content.

MenuAdditionalContentTemplateSelector

Gets or sets the DataTemplateSelector to use for displaying the menu additional content.

public DataTemplateSelector MenuAdditionalContentTemplateSelector { get; set; }

Property Value

DataTemplateSelector:

The DataTemplateSelector to use for displaying the menu additional content.

MenuFooter

Gets or sets the content to display to the footer of the menu.

public object MenuFooter { get; set; }

Property Value

object:

The content to display to the footer of the menu.

MenuFooterTemplate

Gets or sets the DataTemplate to use for displaying the menu footer content.

public DataTemplate MenuFooterTemplate { get; set; }

Property Value

DataTemplate:

The DataTemplate to use for displaying the menu footer content.

MenuFooterTemplateSelector

Gets or sets the DataTemplateSelector to use for displaying the menu footer content.

public DataTemplateSelector MenuFooterTemplateSelector { get; set; }

Property Value

DataTemplateSelector:

The DataTemplateSelector to use for displaying the menu footer content.

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 CancelRoutedEventArgs that contains 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

Identifies the ContentFontSize dependency property. This field is read-only.

public static readonly DependencyProperty ContentFontSizeProperty

ContentProperty

Identifies the Content dependency property. This field is read-only.

public static readonly DependencyProperty ContentProperty

ContentTemplateProperty

Identifies the ContentTemplate dependency property. This field is read-only.

public static readonly DependencyProperty ContentTemplateProperty

ContentTemplateSelectorProperty

Identifies the ContentTemplateSelector dependency property. This field is read-only.

public static readonly DependencyProperty ContentTemplateSelectorProperty

HasContentProperty

Identifies the HasContent dependency property. This field is read-only.

public static readonly DependencyProperty HasContentProperty

HasMenuAdditionalContentProperty

Identifies the HasMenuAdditionalContent dependency property. This field is read-only.

public static readonly DependencyProperty HasMenuAdditionalContentProperty

HasMenuFooterProperty

Identifies the HasMenuFooter dependency property. This field is read-only.

public static readonly DependencyProperty HasMenuFooterProperty

MenuAdditionalContentProperty

Identifies the MenuAdditionalContent dependency property. This field is read-only.

public static readonly DependencyProperty MenuAdditionalContentProperty

MenuAdditionalContentTemplateProperty

Identifies the MenuAdditionalContentTemplate dependency property. This field is read-only.

public static readonly DependencyProperty MenuAdditionalContentTemplateProperty

MenuAdditionalContentTemplateSelectorProperty

Identifies the MenuAdditionalContentTemplateSelector dependency property. This field is read-only.

public static readonly DependencyProperty MenuAdditionalContentTemplateSelectorProperty

MenuFooterProperty

Identifies the MenuFooter dependency property. This field is read-only.

public static readonly DependencyProperty MenuFooterProperty

MenuFooterTemplateProperty

Identifies the MenuFooterTemplate dependency property. This field is read-only.

public static readonly DependencyProperty MenuFooterTemplateProperty

MenuFooterTemplateSelectorProperty

Identifies the MenuFooterTemplateSelector dependency property. This field is read-only.

public static readonly DependencyProperty MenuFooterTemplateSelectorProperty

Inherited Members