Remarks
Application menu is a control that can be accessed from the top left corner of the ribbon. There are two types of item that you can define in UXRibbonApplicationMenu which are UXRibbonApplicationMenuItem and UXRibbonApplicationBackstageMenuItem.
UXRibbonApplicationMenuItem is a command control which behaves similar to UXMenuItem. To learn more about UXMenuItem, see UXDropDownButton Overview. On the other hands, UXRibbonApplicationBackstageMenuItem is a more sophisticated control that displays custom content when the menu item is active.
The following code shows how to define three UXRibbonApplicationMenuItem and one UXRibbonApplicationBackstageMenuItem. Notice that the "Exit" menu item has a command assigned.
The following figure shows the application menu when a backstage menu item is active.
To learn more about UXRibbonApplicationMenu, see Working with Ribbon Application Menu.
Definition
public class UXRibbonApplicationMenuItem : UXRibbonMenuItem
Summary
The following table summarizes the members exposed in this class.
Public Constructors
UXRibbonApplicationMenuItem Constructor() | Creates a new instance of UXRibbonApplicationMenuItem class. |
Public Properties
ContentType | Gets or sets a value that specifies the type for the content. |
Fields
ContentTypeProperty | Identifies the ContentType dependency property. |
Protected Methods
ChangeVisualState(bool) | Change visual state. |
GoToKeyboardFocusedState(bool) | Active keyboard focused state. |
GoToKeyboardFocusedState() | Active keyboard focused state. |
GoToKeyboardUnfocusedState(bool) | Active keyboard unfocused state. |
GoToKeyboardUnfocusedState() | Active keyboard unfocused state. |
OnMouseEnter(MouseEventArgs) | Called before the System.Windows.UIElement.MouseEnter event occurs. |
OnMouseMove(MouseEventArgs) | Called before the System.Windows.UIElement.MouseMove event occurs. |
Public Constructors
public UXRibbonApplicationMenuItem()
Creates a new instance of UXRibbonApplicationMenuItem class.
Public Properties
public ContentType ContentType { get; set; }
Gets or sets a value that specifies the type for the content.
Fields
public static readonly DependencyProperty ContentTypeProperty
Identifies the ContentType dependency property.
Protected Methods
protected void ChangeVisualState(bool useTransitions)
Change visual state.
Parameters
useTransitions |
protected void GoToKeyboardFocusedState(bool animate)
Active keyboard focused state.
Parameters
animate |
protected void GoToKeyboardFocusedState()
Active keyboard focused state.
protected void GoToKeyboardUnfocusedState(bool animate)
Active keyboard unfocused state.
Parameters
animate |
protected void GoToKeyboardUnfocusedState()
Active keyboard unfocused state.
protected void OnMouseEnter(MouseEventArgs e)
Called before the System.Windows.UIElement.MouseEnter event occurs.
Parameters
e | The data for the event. |
protected void OnMouseMove(MouseEventArgs e)
Called before the System.Windows.UIElement.MouseMove event occurs.
Parameters
e | The data for the event. |