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






Provides a button control with dropdown menu functionality.

Object Model

UXRibbonApplicationMenu Class

Syntax

Visual Basic (Declaration) 
<TemplateVisualStateAttribute(Name="MouseOver", GroupName="CommonStates")>
<TemplateVisualStateAttribute(GroupName="CommonStates", Name="Pressed")>
<TemplateVisualStateAttribute(GroupName="CommonStates", Name="Normal")>
<TemplatePartAttribute(Name="KeyboardFocus", Type=System.Windows.Shapes.Rectangle)>
<TemplatePartAttribute(Name="FocusVisualElement", Type=System.Windows.Controls.Border)>
<TemplateVisualStateAttribute(GroupName="FocusStates", Name="Focused")>
<TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardFocused")>
<TemplateVisualStateAttribute(GroupName="CommonStates", Name="Disabled")>
<TemplateVisualStateAttribute(GroupName="CommonStates", Name="HighlightFocused")>
<TemplateVisualStateAttribute(GroupName="CommonStates", Name="Checked")>
<TemplatePartAttribute(Name="DisabledVisualElement", Type=System.Windows.Controls.Border)>
<TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)>
<TemplatePartAttribute(Name="DropDownMenuContainer", Type=System.Windows.Controls.Border)>
<DescriptionAttribute("Provides a button control with dropdown menu functionality.")>
<TemplatePartAttribute(Name="InnerBorder", Type=System.Windows.Controls.Border)>
<TemplateVisualStateAttribute(GroupName="FocusStates", Name="Unfocused")>
<TemplatePartAttribute(Name="Glass", Type=System.Windows.Controls.Border)>
<TemplatePartAttribute(Name="StylishLabel", Type=Intersoft.Client.UI.Controls.StylishLabel)>
<TemplatePartAttribute(Name="SelectedAnimationElement", Type=System.Windows.Controls.Border)>
<TemplatePartAttribute(Name="OuterBorder", Type=System.Windows.Controls.Border)>
<TemplatePartAttribute(Name="AnimationElement", Type=System.Windows.Controls.Border)>
<StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonApplicationMenuItem)>
<StyleTypedPropertyAttribute(Property="DropDownMenuStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonApplicationContextMenu)>
<TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardUnfocused")>
Public Class UXRibbonApplicationMenu 
   Inherits Intersoft.Client.UI.Aqua.UXDropDownButton
   Implements IControlIFramework, ILicensing, INavigationSourceINavigationSupportICommandSourceIKeyboardFocusIRibbonKeyTipAction 
Visual Basic (Usage)Copy Code
Dim instance As UXRibbonApplicationMenu
C# 
[TemplateVisualStateAttribute(Name="MouseOver", GroupName="CommonStates")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Pressed")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Normal")]
[TemplatePartAttribute(Name="KeyboardFocus", Type=System.Windows.Shapes.Rectangle)]
[TemplatePartAttribute(Name="FocusVisualElement", Type=System.Windows.Controls.Border)]
[TemplateVisualStateAttribute(GroupName="FocusStates", Name="Focused")]
[TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardFocused")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Disabled")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="HighlightFocused")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Checked")]
[TemplatePartAttribute(Name="DisabledVisualElement", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="DropDownMenuContainer", Type=System.Windows.Controls.Border)]
[DescriptionAttribute("Provides a button control with dropdown menu functionality.")]
[TemplatePartAttribute(Name="InnerBorder", Type=System.Windows.Controls.Border)]
[TemplateVisualStateAttribute(GroupName="FocusStates", Name="Unfocused")]
[TemplatePartAttribute(Name="Glass", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="StylishLabel", Type=Intersoft.Client.UI.Controls.StylishLabel)]
[TemplatePartAttribute(Name="SelectedAnimationElement", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="OuterBorder", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="AnimationElement", Type=System.Windows.Controls.Border)]
[StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonApplicationMenuItem)]
[StyleTypedPropertyAttribute(Property="DropDownMenuStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonApplicationContextMenu)]
[TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardUnfocused")]
public class UXRibbonApplicationMenu : Intersoft.Client.UI.Aqua.UXDropDownButton, IControlIFramework, ILicensing, INavigationSourceINavigationSupportICommandSourceIKeyboardFocusIRibbonKeyTipAction  
JScript 
TemplateVisualStateAttribute(Name="MouseOver", GroupName="CommonStates")
TemplateVisualStateAttribute(GroupName="CommonStates", Name="Pressed")
TemplateVisualStateAttribute(GroupName="CommonStates", Name="Normal")
TemplatePartAttribute(Name="KeyboardFocus", Type=System.Windows.Shapes.Rectangle)
TemplatePartAttribute(Name="FocusVisualElement", Type=System.Windows.Controls.Border)
TemplateVisualStateAttribute(GroupName="FocusStates", Name="Focused")
TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardFocused")
TemplateVisualStateAttribute(GroupName="CommonStates", Name="Disabled")
TemplateVisualStateAttribute(GroupName="CommonStates", Name="HighlightFocused")
TemplateVisualStateAttribute(GroupName="CommonStates", Name="Checked")
TemplatePartAttribute(Name="DisabledVisualElement", Type=System.Windows.Controls.Border)
TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)
TemplatePartAttribute(Name="DropDownMenuContainer", Type=System.Windows.Controls.Border)
DescriptionAttribute("Provides a button control with dropdown menu functionality.")
TemplatePartAttribute(Name="InnerBorder", Type=System.Windows.Controls.Border)
TemplateVisualStateAttribute(GroupName="FocusStates", Name="Unfocused")
TemplatePartAttribute(Name="Glass", Type=System.Windows.Controls.Border)
TemplatePartAttribute(Name="StylishLabel", Type=Intersoft.Client.UI.Controls.StylishLabel)
TemplatePartAttribute(Name="SelectedAnimationElement", Type=System.Windows.Controls.Border)
TemplatePartAttribute(Name="OuterBorder", Type=System.Windows.Controls.Border)
TemplatePartAttribute(Name="AnimationElement", Type=System.Windows.Controls.Border)
StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonApplicationMenuItem)
StyleTypedPropertyAttribute(Property="DropDownMenuStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonApplicationContextMenu)
TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardUnfocused")
public class UXRibbonApplicationMenu extends Intersoft.Client.UI.Aqua.UXDropDownButton implements IControlIFramework, ILicensing, INavigationSourceINavigationSupportICommandSourceIKeyboardFocusIRibbonKeyTipAction 
Managed Extensions for C++ 
[TemplateVisualStateAttribute(Name="MouseOver", GroupName="CommonStates")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Pressed")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Normal")]
[TemplatePartAttribute(Name="KeyboardFocus", Type=System.Windows.Shapes.Rectangle)]
[TemplatePartAttribute(Name="FocusVisualElement", Type=System.Windows.Controls.Border)]
[TemplateVisualStateAttribute(GroupName="FocusStates", Name="Focused")]
[TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardFocused")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Disabled")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="HighlightFocused")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Checked")]
[TemplatePartAttribute(Name="DisabledVisualElement", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="DropDownMenuContainer", Type=System.Windows.Controls.Border)]
[DescriptionAttribute("Provides a button control with dropdown menu functionality.")]
[TemplatePartAttribute(Name="InnerBorder", Type=System.Windows.Controls.Border)]
[TemplateVisualStateAttribute(GroupName="FocusStates", Name="Unfocused")]
[TemplatePartAttribute(Name="Glass", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="StylishLabel", Type=Intersoft.Client.UI.Controls.StylishLabel)]
[TemplatePartAttribute(Name="SelectedAnimationElement", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="OuterBorder", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="AnimationElement", Type=System.Windows.Controls.Border)]
[StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonApplicationMenuItem)]
[StyleTypedPropertyAttribute(Property="DropDownMenuStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonApplicationContextMenu)]
[TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardUnfocused")]
public __gc class UXRibbonApplicationMenu : public Intersoft.Client.UI.Aqua.UXDropDownButton, IControlIFramework, ILicensing, INavigationSourceINavigationSupportICommandSourceIKeyboardFocusIRibbonKeyTipAction  
C++/CLI 
[TemplateVisualStateAttribute(Name="MouseOver", GroupName="CommonStates")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Pressed")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Normal")]
[TemplatePartAttribute(Name="KeyboardFocus", Type=System.Windows.Shapes.Rectangle)]
[TemplatePartAttribute(Name="FocusVisualElement", Type=System.Windows.Controls.Border)]
[TemplateVisualStateAttribute(GroupName="FocusStates", Name="Focused")]
[TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardFocused")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Disabled")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="HighlightFocused")]
[TemplateVisualStateAttribute(GroupName="CommonStates", Name="Checked")]
[TemplatePartAttribute(Name="DisabledVisualElement", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)]
[TemplatePartAttribute(Name="DropDownMenuContainer", Type=System.Windows.Controls.Border)]
[DescriptionAttribute("Provides a button control with dropdown menu functionality.")]
[TemplatePartAttribute(Name="InnerBorder", Type=System.Windows.Controls.Border)]
[TemplateVisualStateAttribute(GroupName="FocusStates", Name="Unfocused")]
[TemplatePartAttribute(Name="Glass", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="StylishLabel", Type=Intersoft.Client.UI.Controls.StylishLabel)]
[TemplatePartAttribute(Name="SelectedAnimationElement", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="OuterBorder", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="AnimationElement", Type=System.Windows.Controls.Border)]
[StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonApplicationMenuItem)]
[StyleTypedPropertyAttribute(Property="DropDownMenuStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonApplicationContextMenu)]
[TemplateVisualStateAttribute(GroupName="KeyboardFocusStates", Name="KeyboardUnfocused")]
public ref class UXRibbonApplicationMenu : public Intersoft.Client.UI.Aqua.UXDropDownButton, IControlIFramework, ILicensing, INavigationSourceINavigationSupportICommandSourceIKeyboardFocusIRibbonKeyTipAction  

Remarks

Application menu is a menu 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 having similar behaviors with 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.

Using Commands in Application Menu Item

The following example shows how to assign a command to a UXRibbonApplicationMenuItem which will be executed when the item is clicked.

XAML Copy Code
<Intersoft:UXRibbonApplicationMenuItem Header="Add new task" Command="{Binding AddNewTaskCommand}" />

Inheritance Hierarchy

System.Object
   System.Windows.DependencyObject
      System.Windows.UIElement
         System.Windows.FrameworkElement
            System.Windows.Controls.Control
               System.Windows.Controls.ContentControl
                  System.Windows.Controls.Primitives.ButtonBase
                     System.Windows.Controls.Button
                        Intersoft.Client.Framework.ISButton
                           Intersoft.Client.UI.Aqua.UXButton
                              Intersoft.Client.UI.Aqua.UXButtonItems
                                 Intersoft.Client.UI.Aqua.UXDropDownButton
                                    Intersoft.Client.UI.Aqua.UXRibbon.UXRibbonApplicationMenu

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.