Intersoft ClientUI 8 > ClientUI Application Development > Working with ClientUI Controls in Visual Studio 2010 Designer > Walkthrough: Add Menu Item and Separator to Menu Bar in Designer |
This walkthrough shows you to add menu item and separator to menu bar using Visual Studio designer.
You need the following components to complete this walkthrough:
The first step is to create a new ClientUI Application project using Intersoft ClientUI Application project template in Visual Studio.
This section show how to add UXMenuItem and UXSeparator to UXMenuBar using designer.
In this walkthrough, you have learned how to create ClientUI Application project using Intersoft ClientUI Application project template, create the UXMenuBar, UXMenuItem and UXSeparator using Visual Studio designer.
MainPage |
Copy Code
|
---|---|
<Intersoft:UXPage xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:Intersoft="http://intersoft.clientui.com/schemas" x:Class="AddtoMenuBar.MainPage" Title="MainPage Page" d:DesignWidth="640" d:DesignHeight="480"> <Grid x:Name="LayoutRoot"> <Intersoft:UXWindow Header="UXWindow Title" Height="300" Name="uXWindow1" Width="500" IsClientVisible="True"> <Grid> <Intersoft:DockPanel Name="dockPanel1" FillChildMode="Custom"> <Intersoft:UXMenuBar Name="uXMenuBar1" Intersoft:DockPanel.Dock="Top"> <Intersoft:UXMenuItem Header="File"> <Intersoft:UXMenuItem Header="Open" /> <Intersoft:UXMenuItem Header="Save" /> <Intersoft:UXMenuItem Header="Save As" /> <Intersoft:UXSeparator HorizontalAlignment="Left" Name="uXSeparator1" VerticalAlignment="Top" /> <Intersoft:UXMenuItem Header="Page Setup" /> <Intersoft:UXMenuItem Header="Print" /> <Intersoft:UXSeparator HorizontalAlignment="Left" Name="uXSeparator2" VerticalAlignment="Top" /> <Intersoft:UXMenuItem Header="Exit" /> </Intersoft:UXMenuItem> <Intersoft:UXMenuItem Header="Edit"> <Intersoft:UXMenuItem Header="Undo" /> <Intersoft:UXSeparator HorizontalAlignment="Left" Name="uXSeparator3" VerticalAlignment="Top" /> <Intersoft:UXMenuItem Header="Cut" /> <Intersoft:UXMenuItem Header="Copy" /> <Intersoft:UXMenuItem Header="Paste" /> <Intersoft:UXSeparator HorizontalAlignment="Left" Name="uXSeparator4" VerticalAlignment="Top" /> <Intersoft:UXMenuItem Header="Select All" /> </Intersoft:UXMenuItem> <Intersoft:UXMenuItem Header="Format"> <Intersoft:UXMenuItem Header="Bold" /> <Intersoft:UXMenuItem Header="Italic" /> </Intersoft:UXMenuItem> </Intersoft:UXMenuBar> <RichTextBox Name="richTextBox1" Intersoft:DockPanel.IsFillElement="True" /> </Intersoft:DockPanel> </Grid> </Intersoft:UXWindow> </Grid> </Intersoft:UXPage> |