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, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IAddChild, IGeneratorHost, IContainItemStorage, ICommandSource, IPopupAnchor, ISupportsCoerceKeyTipText
Inheritance:
System.Object System.Windows.Threading.DispatcherObject System.Windows.DependencyObject System.Windows.Media.Visual System.Windows.UIElement System.Windows.FrameworkElement System.Windows.Controls.Control System.Windows.Controls.ItemsControl System.Windows.Controls.Primitives.MenuBase System.Windows.Controls.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

System.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

System.Double:

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

ContentTemplate

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

public DataTemplate ContentTemplate { get; set; }

Property Value

System.Windows.DataTemplate:

The System.Windows.DataTemplate to use for displaying the content.

ContentTemplateSelector

Gets or sets the System.Windows.Controls.DataTemplateSelector to use for displaying the content.

public DataTemplateSelector ContentTemplateSelector { get; set; }

Property Value

System.Windows.Controls.DataTemplateSelector:

The System.Windows.Controls.DataTemplateSelector to use for displaying the content.

HasContent

Gets whether there is Content available.

public bool HasContent { get; }

Property Value

System.Boolean:

true if there is Content available; otherwise, false.

HasMenuAdditionalContent

Gets whether there is MenuAdditionalContent available.

public bool HasMenuAdditionalContent { get; }

Property Value

System.Boolean:

true if there is MenuAdditionalContent available; otherwise, false.

HasMenuFooter

Gets whether there is a MenuFooter available.

public bool HasMenuFooter { get; }

Property Value

System.Boolean:

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

System.Object:

The content to display to the right of the menu.

MenuAdditionalContentTemplate

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

public DataTemplate MenuAdditionalContentTemplate { get; set; }

Property Value

System.Windows.DataTemplate:

The System.Windows.DataTemplate to use for displaying the menu additional content.

MenuAdditionalContentTemplateSelector

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

public DataTemplateSelector MenuAdditionalContentTemplateSelector { get; set; }

Property Value

System.Windows.Controls.DataTemplateSelector:

The System.Windows.Controls.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

System.Object:

The content to display to the footer of the menu.

MenuFooterTemplate

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

public DataTemplate MenuFooterTemplate { get; set; }

Property Value

System.Windows.DataTemplate:

The System.Windows.DataTemplate to use for displaying the menu footer content.

MenuFooterTemplateSelector

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

public DataTemplateSelector MenuFooterTemplateSelector { get; set; }

Property Value

System.Windows.Controls.DataTemplateSelector:

The System.Windows.Controls.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 System.Object

The old value.

newValue System.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 System.Windows.DataTemplate

The old value.

newValue System.Windows.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 System.Windows.Controls.DataTemplateSelector

The old value.

newValue System.Windows.Controls.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

System.Windows.Automation.Peers.AutomationPeer:

The type-specific System.Windows.Automation.Peers.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 System.Windows.Input.MouseButtonEventArgs

The System.Windows.Input.MouseButtonEventArgs containing data related to this event.

OnKeyDown(KeyEventArgs)

Responds to the KeyDown event.

protected override void OnKeyDown(KeyEventArgs e)
Parameter Type Description
e System.Windows.Input.KeyEventArgs

A System.Windows.Input.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 System.Object

The old value.

newValue System.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 System.Windows.DataTemplate

The old value.

newValue System.Windows.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 System.Windows.Controls.DataTemplateSelector

The old value.

newValue System.Windows.Controls.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 System.Object

The old value.

newValue System.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 System.Windows.DataTemplate

The old value.

newValue System.Windows.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 System.Windows.Controls.DataTemplateSelector

The old value.

newValue System.Windows.Controls.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 System.Windows.Input.MouseButtonEventArgs

The System.Windows.Input.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

Extension Methods