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






Provides a lightweight menu bar control.

Object Model

UXMenuBar Class

Syntax

Visual Basic (Declaration) 
<StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXMenuItem)>
<TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)>
<TemplatePartAttribute(Name="BackgroundElement", Type=System.Windows.Controls.Border)>
<DescriptionAttribute("Provides a lightweight menu bar control.")>
<TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)>
Public Class UXMenuBar 
   Inherits UXMenuBase
   Implements IControlIFramework, ILicensing, ISelectionIMenu 
Visual Basic (Usage)Copy Code
Dim instance As UXMenuBar
C# 
[StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXMenuItem)]
[TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)]
[TemplatePartAttribute(Name="BackgroundElement", Type=System.Windows.Controls.Border)]
[DescriptionAttribute("Provides a lightweight menu bar control.")]
[TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)]
public class UXMenuBar : UXMenuBase, IControlIFramework, ILicensing, ISelectionIMenu  
Delphi 
public class UXMenuBar = class(UXMenuBase, IControl, IFramework, ILicensing, ISelection, IMenu)
JScript 
StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXMenuItem)
TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)
TemplatePartAttribute(Name="BackgroundElement", Type=System.Windows.Controls.Border)
DescriptionAttribute("Provides a lightweight menu bar control.")
TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)
public class UXMenuBar extends UXMenuBase implements IControlIFramework, ILicensing, ISelectionIMenu 
Managed Extensions for C++ 
[StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXMenuItem)]
[TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)]
[TemplatePartAttribute(Name="BackgroundElement", Type=System.Windows.Controls.Border)]
[DescriptionAttribute("Provides a lightweight menu bar control.")]
[TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)]
public __gc class UXMenuBar : public UXMenuBase, IControlIFramework, ILicensing, ISelectionIMenu  
C++/CLI 
[StyleTypedPropertyAttribute(Property="ItemContainerStyle", StyleTargetType=Intersoft.Client.UI.Aqua.UXMenuItem)]
[TemplatePartAttribute(Name="ItemsPresenter", Type=System.Windows.Controls.ItemsPresenter)]
[TemplatePartAttribute(Name="BackgroundElement", Type=System.Windows.Controls.Border)]
[DescriptionAttribute("Provides a lightweight menu bar control.")]
[TemplatePartAttribute(Name="RootElement", Type=System.Windows.Controls.Grid)]
public ref class UXMenuBar : public UXMenuBase, IControlIFramework, ILicensing, ISelectionIMenu  

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>

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>

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 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.