Intersoft.Client.UI.Aqua.UXRibbon Namespace : UXRibbonApplicationMenuItem Class |
<TemplateVisualStateAttribute(Name="Pressed", GroupName="CommonStates")> <TemplateVisualStateAttribute(GroupName="CommonStates", Name="Disabled")> <TemplateVisualStateAttribute(GroupName="CommonStates", Name="MouseOver")> <TemplateVisualStateAttribute(GroupName="CommonStates", Name="DisabledMouseOver")> <TemplateVisualStateAttribute(GroupName="CommonStates", Name="Normal")> <TemplateVisualStateAttribute(GroupName="SelectionStates", Name="Unselected")> <TemplateVisualStateAttribute(GroupName="SelectionStates", Name="Selected")> <StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonApplicationMenuItem)> <TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardUnfocused")> <DescriptionAttribute("Represents an application menu item control.")> <TemplateVisualStateAttribute(GroupName="CheckedStates", Name="Unchecked")> <TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)> <TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)> <TemplatePartAttribute(Name="KeyboardAnimationElement", Type=System.Windows.Controls.Border)> <TemplatePartAttribute(Name="PointerElement", Type=System.Windows.Shapes.Path)> <TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardFocused")> <TemplateVisualStateAttribute(GroupName="CheckedStates", Name="Checked")> <TemplatePartAttribute(Name="KeyboardInnerBorder", Type=System.Windows.Controls.Border)> <TemplatePartAttribute(Name="ContentPresenter", Type=Intersoft.Client.UI.Controls.StylishLabel)> <TemplatePartAttribute(Name="TextCommandElement", Type=System.Windows.Controls.TextBlock)> <TemplatePartAttribute(Name="MenuElement", Type=Intersoft.Client.UI.Aqua.UXMenu)> <TemplatePartAttribute(Name="InnerBorder", Type=System.Windows.Controls.Border)> <TemplatePartAttribute(Name="AnimationElement", Type=System.Windows.Controls.Border)> <TemplatePartAttribute(Name="ContentElement", Type=System.Windows.Controls.Grid)> Public Class UXRibbonApplicationMenuItem Inherits UXRibbonMenuItem Implements Intersoft.Client.Framework.IControl, Intersoft.Client.Framework.IFramework, Intersoft.Client.Framework.IItemsControl, Intersoft.Client.Framework.ILicensing, Intersoft.Client.Framework.INavigationSource, Intersoft.Client.Framework.INavigationSupport, Intersoft.Client.Framework.Input.ICommandSource, Intersoft.Client.Framework.ISelection, Intersoft.Client.Framework.ISelectionItem, IRibbonKeyTipAction
Dim instance As UXRibbonApplicationMenuItem
[TemplateVisualStateAttribute(Name="Pressed", GroupName="CommonStates")] [TemplateVisualStateAttribute(GroupName="CommonStates", Name="Disabled")] [TemplateVisualStateAttribute(GroupName="CommonStates", Name="MouseOver")] [TemplateVisualStateAttribute(GroupName="CommonStates", Name="DisabledMouseOver")] [TemplateVisualStateAttribute(GroupName="CommonStates", Name="Normal")] [TemplateVisualStateAttribute(GroupName="SelectionStates", Name="Unselected")] [TemplateVisualStateAttribute(GroupName="SelectionStates", Name="Selected")] [StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonApplicationMenuItem)] [TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardUnfocused")] [DescriptionAttribute("Represents an application menu item control.")] [TemplateVisualStateAttribute(GroupName="CheckedStates", Name="Unchecked")] [TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)] [TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)] [TemplatePartAttribute(Name="KeyboardAnimationElement", Type=System.Windows.Controls.Border)] [TemplatePartAttribute(Name="PointerElement", Type=System.Windows.Shapes.Path)] [TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardFocused")] [TemplateVisualStateAttribute(GroupName="CheckedStates", Name="Checked")] [TemplatePartAttribute(Name="KeyboardInnerBorder", Type=System.Windows.Controls.Border)] [TemplatePartAttribute(Name="ContentPresenter", Type=Intersoft.Client.UI.Controls.StylishLabel)] [TemplatePartAttribute(Name="TextCommandElement", Type=System.Windows.Controls.TextBlock)] [TemplatePartAttribute(Name="MenuElement", Type=Intersoft.Client.UI.Aqua.UXMenu)] [TemplatePartAttribute(Name="InnerBorder", Type=System.Windows.Controls.Border)] [TemplatePartAttribute(Name="AnimationElement", Type=System.Windows.Controls.Border)] [TemplatePartAttribute(Name="ContentElement", Type=System.Windows.Controls.Grid)] public class UXRibbonApplicationMenuItem : UXRibbonMenuItem, Intersoft.Client.Framework.IControl, Intersoft.Client.Framework.IFramework, Intersoft.Client.Framework.IItemsControl, Intersoft.Client.Framework.ILicensing, Intersoft.Client.Framework.INavigationSource, Intersoft.Client.Framework.INavigationSupport, Intersoft.Client.Framework.Input.ICommandSource, Intersoft.Client.Framework.ISelection, Intersoft.Client.Framework.ISelectionItem, IRibbonKeyTipAction
[TemplateVisualStateAttribute(Name="Pressed", GroupName="CommonStates")] [TemplateVisualStateAttribute(GroupName="CommonStates", Name="Disabled")] [TemplateVisualStateAttribute(GroupName="CommonStates", Name="MouseOver")] [TemplateVisualStateAttribute(GroupName="CommonStates", Name="DisabledMouseOver")] [TemplateVisualStateAttribute(GroupName="CommonStates", Name="Normal")] [TemplateVisualStateAttribute(GroupName="SelectionStates", Name="Unselected")] [TemplateVisualStateAttribute(GroupName="SelectionStates", Name="Selected")] [StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonApplicationMenuItem)] [TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardUnfocused")] [DescriptionAttribute("Represents an application menu item control.")] [TemplateVisualStateAttribute(GroupName="CheckedStates", Name="Unchecked")] [TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)] [TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)] [TemplatePartAttribute(Name="KeyboardAnimationElement", Type=System.Windows.Controls.Border)] [TemplatePartAttribute(Name="PointerElement", Type=System.Windows.Shapes.Path)] [TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardFocused")] [TemplateVisualStateAttribute(GroupName="CheckedStates", Name="Checked")] [TemplatePartAttribute(Name="KeyboardInnerBorder", Type=System.Windows.Controls.Border)] [TemplatePartAttribute(Name="ContentPresenter", Type=Intersoft.Client.UI.Controls.StylishLabel)] [TemplatePartAttribute(Name="TextCommandElement", Type=System.Windows.Controls.TextBlock)] [TemplatePartAttribute(Name="MenuElement", Type=Intersoft.Client.UI.Aqua.UXMenu)] [TemplatePartAttribute(Name="InnerBorder", Type=System.Windows.Controls.Border)] [TemplatePartAttribute(Name="AnimationElement", Type=System.Windows.Controls.Border)] [TemplatePartAttribute(Name="ContentElement", Type=System.Windows.Controls.Grid)] public ref class UXRibbonApplicationMenuItem : public UXRibbonMenuItem, Intersoft.Client.Framework.IControl, Intersoft.Client.Framework.IFramework, Intersoft.Client.Framework.IItemsControl, Intersoft.Client.Framework.ILicensing, Intersoft.Client.Framework.INavigationSource, Intersoft.Client.Framework.INavigationSupport, Intersoft.Client.Framework.Input.ICommandSource, Intersoft.Client.Framework.ISelection, Intersoft.Client.Framework.ISelectionItem, IRibbonKeyTipAction
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.
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
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2