In This Article

ApplicationMenu Class

Represents a default application menu control, similar to the application menu used in Office 2007.

[TemplatePart(Name = "PART_AdditionalContent", Type = typeof(ContentPresenter))]
[TemplatePart(Name = "PART_ApplicationButton", Type = typeof(Rectangle))]
public class ApplicationMenu : ItemsControlBase, IKeyTipTarget, ILogicalParent, IVariantControl
Inheritance:
object Visual UIElement FrameworkElement Control ItemsControl ItemsControlBase object
Implements:
IKeyTipTarget ILogicalParent IVariantControl

Remarks

For detailed documentation on this control's features and how to use them, please see the ApplicationMenu documentation topic.

Constructors

ApplicationMenu()

Initializes an instance of the ApplicationMenu class.

public ApplicationMenu()

Properties

AdditionalContent

Gets or sets the additional content that appears on the right side of the application menu.

public object AdditionalContent { get; set; }

Property Value

object:

The additional content that appears on the right side of the application menu.

CornerRadius

Gets or sets the corner radius of the border.

public double CornerRadius { get; set; }

Property Value

double:

The corner radius of the border.

FooterButtons

Gets the RibbonControlCollection<UIElement> containing the footer buttons.

public RibbonControlCollection<UIElement> FooterButtons { get; }

Property Value

RibbonControlCollection<UIElement>:

The RibbonControlCollection<UIElement> containing the footer buttons.

LogicalChildren

Gets an enumerator for logical child elements of this element.

protected override IEnumerator LogicalChildren { get; }

Property Value

IEnumerator:

An enumerator for logical child elements of this element.

Methods

OnCreateAutomationPeer()

Creates and returns an AutomationPeer object for this type.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer:

The AutomationPeer that was created.

OnItemsChanged(NotifyCollectionChangedEventArgs)

Invoked when the Items property changes.

protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Parameter Type Description
e NotifyCollectionChangedEventArgs

A NotifyCollectionChangedEventArgs that contains the event data.

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.

OnTextInput(TextCompositionEventArgs)

Invoked when an unhandled TextCompositionManager.TextInputEvent attached event is raised on this element. Implement this method to add class handling for this event.

protected override void OnTextInput(TextCompositionEventArgs e)
Parameter Type Description
e TextCompositionEventArgs

A TextCompositionEventArgs that contains the event data.

OnValidateItems(IList)

Invoked when the specified IList of items needs to be validated for inclusion in this ItemsControl.

protected override void OnValidateItems(IList items)
Parameter Type Description
items IList

The IList of items to validate.

Fields

AdditionalContentProperty

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

public static readonly DependencyProperty AdditionalContentProperty

CornerRadiusProperty

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

public static readonly DependencyProperty CornerRadiusProperty

Inherited Members