Intersoft ClientUI Documentation
UXMenuBar Class
Members 



Provides a lightweight menu bar control.
Object Model
UXMenuBar ClassISFramework ClassStyleSelector ClassDataTemplateSelector Class
Syntax
<TemplatePartAttribute(Name="BackgroundElement", Type=System.Windows.Controls.Border)>
<TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)>
<StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXMenuItem)>
<TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)>
<DescriptionAttribute("Provides a lightweight menu bar control.")>
Public Class UXMenuBar 
   Inherits UXMenuBase
   Implements Intersoft.Client.Framework.IControlIntersoft.Client.Framework.IFrameworkIntersoft.Client.Framework.IItemsControl, Intersoft.Client.Framework.ILicensing, Intersoft.Client.Framework.ISelectionIMenu 
Dim instance As UXMenuBar
[TemplatePartAttribute(Name="BackgroundElement", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)]
[StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXMenuItem)]
[TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)]
[DescriptionAttribute("Provides a lightweight menu bar control.")]
public class UXMenuBar : UXMenuBase, Intersoft.Client.Framework.IControlIntersoft.Client.Framework.IFrameworkIntersoft.Client.Framework.IItemsControl, Intersoft.Client.Framework.ILicensing, Intersoft.Client.Framework.ISelectionIMenu  
[TemplatePartAttribute(Name="BackgroundElement", Type=System.Windows.Controls.Border)]
[TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)]
[StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXMenuItem)]
[TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)]
[DescriptionAttribute("Provides a lightweight menu bar control.")]
public ref class UXMenuBar : public UXMenuBase, Intersoft.Client.Framework.IControlIntersoft.Client.Framework.IFrameworkIntersoft.Client.Framework.IItemsControl, Intersoft.Client.Framework.ILicensing, Intersoft.Client.Framework.ISelectionIMenu  
Remarks

UXMenuBar is inherited from ISSelectionControl which means it contains properties to indicate and control the current selection such as SelectedIndex, SelectedItem, SelectedValue, SelectedValuePath, SelectedElement. You can bind these properties to a DataContext using object binding, or using MVVM pattern. To learn more about MVVM pattern, see MVVM Pattern Overview.

Any changes to one of the properties means that the current selection has changed, and it will synchronize the UI and other related properties automatically. To learn more about selection control see Items Control Overview.

The following example shows how to create a simple menu bar using UXMenuBar control.

XAML
Copy Code
<Intersoft:UXMenuBar VerticalAlignment="Top" HorizontalAlignment="Left" Width="150">
    <Intersoft:UXMenuItem Header="File">
        <Intersoft:UXMenuItem Header="New" Command="{Binding NewCommand}"/>
        <Intersoft:UXMenuItem Header="Save" Command="{Binding SaveCommand}"/>
        <Intersoft:UXSeparator/>
        <Intersoft:UXMenuItem Header="Exit" Command="{Binding ExitCommand}"/>
    </Intersoft:UXMenuItem>
    <Intersoft:UXMenuItem Header="Help">
        <Intersoft:UXMenuItem Header="About" NavigateUri="www.mycompany.com" TargetName="_blank"/>
    </Intersoft:UXMenuItem>
</Intersoft:UXMenuBar>
Example

The following example shos how to create a simple menu bar.

XAML
Copy Code
<Intersoft:UXMenuBar VerticalAlignment="Top">
    <Intersoft:UXMenuItem Header="New">
        <Intersoft:UXMenuItem Header="File"/>
        <Intersoft:UXMenuItem Header="Save"/>
        <Intersoft:UXMenuItem Header="Exit"/>
    </Intersoft:UXMenuItem>
    <Intersoft:UXMenuItem Header="Help">
        <Intersoft:UXMenuItem Header="About"/>
    </Intersoft:UXMenuItem>
</Intersoft:UXMenuBar>

Inheritance Hierarchy

System.Object
   System.Windows.DependencyObject
      System.Windows.UIElement
         System.Windows.FrameworkElement
            System.Windows.Controls.Control
               System.Windows.Controls.ItemsControl
                  Intersoft.Client.Framework.ISItemsControl
                     Intersoft.Client.Framework.ISSelectionControl
                        Intersoft.Client.UI.Aqua.UXMenuBase
                           Intersoft.Client.UI.Aqua.UXMenuBar

Requirements

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

See Also

Reference

UXMenuBar Members
Intersoft.Client.UI.Aqua Namespace

Concepts

UXMenuBar

Send Feedback