Intersoft ClientUI Documentation
UXRibbonApplicationMenuItem Class
Members  See Also  Send Feedback
Intersoft.Client.UI.Aqua.UXRibbon Namespace : UXRibbonApplicationMenuItem Class






Represents an application menu item control.

Object Model

UXRibbonApplicationMenuItem Class

Syntax

Visual Basic (Declaration) 
<TemplateVisualStateAttribute(Name="Normal", GroupName="CommonStates")>
<TemplateVisualStateAttribute(GroupName="CommonStates", Name="MouseOver")>
<DescriptionAttribute("Represents an application menu item control.")>
<TemplatePartAttribute(Name="TextCommandElement", Type=System.Windows.Controls.TextBlock)>
<TemplateVisualStateAttribute(GroupName="CheckedStates", Name="Checked")>
<TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardFocused")>
<TemplateVisualStateAttribute(GroupName="SelectionStates", Name="Selected")>
<StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonApplicationMenuItem)>
<TemplateVisualStateAttribute(GroupName="SelectionStates", Name="Unselected")>
<TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)>
<TemplateVisualStateAttribute(GroupName="CheckedStates", Name="Unchecked")>
<TemplateVisualStateAttribute(GroupName="CommonStates", Name="Pressed")>
<TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardUnfocused")>
<TemplatePartAttribute(Name="MenuElement", Type=Intersoft.Client.UI.Aqua.UXMenu)>
<TemplatePartAttribute(Name="PointerElement", Type=System.Windows.Shapes.Path)>
<TemplateVisualStateAttribute(GroupName="CommonStates", Name="Disabled")>
<TemplateVisualStateAttribute(GroupName="CommonStates", Name="DisabledMouseOver")>
<TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)>
<TemplatePartAttribute(Name="InnerBorder", Type=System.Windows.Controls.Border)>
<TemplatePartAttribute(Name="ContentElement", Type=System.Windows.Controls.Grid)>
<TemplatePartAttribute(Name="ContentPresenter", Type=Intersoft.Client.UI.Controls.StylishLabel)>
<TemplatePartAttribute(Name="KeyboardInnerBorder", Type=System.Windows.Controls.Border)>
<TemplatePartAttribute(Name="KeyboardAnimationElement", Type=System.Windows.Controls.Border)>
<TemplatePartAttribute(Name="AnimationElement", Type=System.Windows.Controls.Border)>
Public Class UXRibbonApplicationMenuItem 
   Inherits UXRibbonMenuItem
   Implements IControlIFramework, ILicensing, INavigationSourceINavigationSupportICommandSourceISelectionISelectionItemIRibbonKeyTipAction 
Visual Basic (Usage)Copy Code
Dim instance As UXRibbonApplicationMenuItem
C# 
[TemplateVisualStateAttribute(Name="Normal", GroupName="CommonStates")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="MouseOver")]
[DescriptionAttribute("Represents an application menu item control.")]
[TemplatePartAttribute(Name="TextCommandElement", Type=System.Windows.Controls.TextBlock)]
[TemplateVisualStateAttribute(GroupName="CheckedStates", Name="Checked")]
[TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardFocused")]
[TemplateVisualStateAttribute(GroupName="SelectionStates", Name="Selected")]
[StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonApplicationMenuItem)]
[TemplateVisualStateAttribute(GroupName="SelectionStates", Name="Unselected")]
[TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)]
[TemplateVisualStateAttribute(GroupName="CheckedStates", Name="Unchecked")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Pressed")]
[TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardUnfocused")]
[TemplatePartAttribute(Name="MenuElement", Type=Intersoft.Client.UI.Aqua.UXMenu)]
[TemplatePartAttribute(Name="PointerElement", Type=System.Windows.Shapes.Path)]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Disabled")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="DisabledMouseOver")]
[TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="InnerBorder", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="ContentElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="ContentPresenter", Type=Intersoft.Client.UI.Controls.StylishLabel)]
[TemplatePartAttribute(Name="KeyboardInnerBorder", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="KeyboardAnimationElement", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="AnimationElement", Type=System.Windows.Controls.Border)]
public class UXRibbonApplicationMenuItem : UXRibbonMenuItem, IControlIFramework, ILicensing, INavigationSourceINavigationSupportICommandSourceISelectionISelectionItemIRibbonKeyTipAction  
Delphi 
public class UXRibbonApplicationMenuItem = class(UXRibbonMenuItem, IControl, IFramework, ILicensing, INavigationSource, INavigationSupport, ICommandSource, ISelection, ISelectionItem, IRibbonKeyTipAction)
JScript 
TemplateVisualStateAttribute(Name="Normal", GroupName="CommonStates")
TemplateVisualStateAttribute(GroupName="CommonStates", Name="MouseOver")
DescriptionAttribute("Represents an application menu item control.")
TemplatePartAttribute(Name="TextCommandElement", Type=System.Windows.Controls.TextBlock)
TemplateVisualStateAttribute(GroupName="CheckedStates", Name="Checked")
TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardFocused")
TemplateVisualStateAttribute(GroupName="SelectionStates", Name="Selected")
StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonApplicationMenuItem)
TemplateVisualStateAttribute(GroupName="SelectionStates", Name="Unselected")
TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)
TemplateVisualStateAttribute(GroupName="CheckedStates", Name="Unchecked")
TemplateVisualStateAttribute(GroupName="CommonStates", Name="Pressed")
TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardUnfocused")
TemplatePartAttribute(Name="MenuElement", Type=Intersoft.Client.UI.Aqua.UXMenu)
TemplatePartAttribute(Name="PointerElement", Type=System.Windows.Shapes.Path)
TemplateVisualStateAttribute(GroupName="CommonStates", Name="Disabled")
TemplateVisualStateAttribute(GroupName="CommonStates", Name="DisabledMouseOver")
TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)
TemplatePartAttribute(Name="InnerBorder", Type=System.Windows.Controls.Border)
TemplatePartAttribute(Name="ContentElement", Type=System.Windows.Controls.Grid)
TemplatePartAttribute(Name="ContentPresenter", Type=Intersoft.Client.UI.Controls.StylishLabel)
TemplatePartAttribute(Name="KeyboardInnerBorder", Type=System.Windows.Controls.Border)
TemplatePartAttribute(Name="KeyboardAnimationElement", Type=System.Windows.Controls.Border)
TemplatePartAttribute(Name="AnimationElement", Type=System.Windows.Controls.Border)
public class UXRibbonApplicationMenuItem extends UXRibbonMenuItem implements IControlIFramework, ILicensing, INavigationSourceINavigationSupportICommandSourceISelectionISelectionItemIRibbonKeyTipAction 
Managed Extensions for C++ 
[TemplateVisualStateAttribute(Name="Normal", GroupName="CommonStates")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="MouseOver")]
[DescriptionAttribute("Represents an application menu item control.")]
[TemplatePartAttribute(Name="TextCommandElement", Type=System.Windows.Controls.TextBlock)]
[TemplateVisualStateAttribute(GroupName="CheckedStates", Name="Checked")]
[TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardFocused")]
[TemplateVisualStateAttribute(GroupName="SelectionStates", Name="Selected")]
[StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonApplicationMenuItem)]
[TemplateVisualStateAttribute(GroupName="SelectionStates", Name="Unselected")]
[TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)]
[TemplateVisualStateAttribute(GroupName="CheckedStates", Name="Unchecked")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Pressed")]
[TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardUnfocused")]
[TemplatePartAttribute(Name="MenuElement", Type=Intersoft.Client.UI.Aqua.UXMenu)]
[TemplatePartAttribute(Name="PointerElement", Type=System.Windows.Shapes.Path)]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Disabled")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="DisabledMouseOver")]
[TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="InnerBorder", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="ContentElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="ContentPresenter", Type=Intersoft.Client.UI.Controls.StylishLabel)]
[TemplatePartAttribute(Name="KeyboardInnerBorder", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="KeyboardAnimationElement", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="AnimationElement", Type=System.Windows.Controls.Border)]
public __gc class UXRibbonApplicationMenuItem : public UXRibbonMenuItem, IControlIFramework, ILicensing, INavigationSourceINavigationSupportICommandSourceISelectionISelectionItemIRibbonKeyTipAction  
C++/CLI 
[TemplateVisualStateAttribute(Name="Normal", GroupName="CommonStates")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="MouseOver")]
[DescriptionAttribute("Represents an application menu item control.")]
[TemplatePartAttribute(Name="TextCommandElement", Type=System.Windows.Controls.TextBlock)]
[TemplateVisualStateAttribute(GroupName="CheckedStates", Name="Checked")]
[TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardFocused")]
[TemplateVisualStateAttribute(GroupName="SelectionStates", Name="Selected")]
[StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonApplicationMenuItem)]
[TemplateVisualStateAttribute(GroupName="SelectionStates", Name="Unselected")]
[TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)]
[TemplateVisualStateAttribute(GroupName="CheckedStates", Name="Unchecked")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Pressed")]
[TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardUnfocused")]
[TemplatePartAttribute(Name="MenuElement", Type=Intersoft.Client.UI.Aqua.UXMenu)]
[TemplatePartAttribute(Name="PointerElement", Type=System.Windows.Shapes.Path)]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Disabled")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="DisabledMouseOver")]
[TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="InnerBorder", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="ContentElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="ContentPresenter", Type=Intersoft.Client.UI.Controls.StylishLabel)]
[TemplatePartAttribute(Name="KeyboardInnerBorder", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="KeyboardAnimationElement", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="AnimationElement", Type=System.Windows.Controls.Border)]
public ref class UXRibbonApplicationMenuItem : public UXRibbonMenuItem, IControlIFramework, ILicensing, INavigationSourceINavigationSupportICommandSourceISelectionISelectionItemIRibbonKeyTipAction  

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.

XAML Copy Code
<Intersoft:UXRibbonBar>
    <Intersoft:UXRibbonBar.ApplicationMenu>        
        <Intersoft:UXRibbonApplicationMenu Content="File">
            <Intersoft:UXRibbonApplicationMenuItem Header="Save" />
            <Intersoft:UXRibbonApplicationMenuItem Header="Save As" />
            <Intersoft:UXRibbonApplicationBackstageMenuItem Header="Info">
                <UserControl:MenuInfo />
            </Intersoft:UXRibbonApplicationBackstageMenuItem>
            <Intersoft:UXRibbonApplicationMenuItem Header="Exit" Command="Intersoft:WindowCommands.Close" />
        </Intersoft:UXRibbonApplicationMenu>
    </Intersoft:UXRibbonBar.ApplicationMenu>
</Intersoft:UXRibbonBar>

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.

Inheritance Hierarchy

System.Object
   System.Windows.DependencyObject
      System.Windows.UIElement
         System.Windows.FrameworkElement
            System.Windows.Controls.Control
               System.Windows.Controls.ItemsControl
                  Intersoft.Client.Framework.HeaderedItemsControl
                     Intersoft.Client.Framework.ISHeaderedItemsControl
                        Intersoft.Client.Framework.ISHeaderedSelectionControl
                           Intersoft.Client.UI.Aqua.UXMenuItem
                              Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonMenuItem
                                 Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonApplicationMenuItem

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.