<Window x:Class="WPFProject.UI.WorkWindow"
|
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"
|
xmlns:local="clr-namespace:WPFProject.UI"
|
xmlns:mdi="clr-namespace:WPF.MDI;assembly=WPF.MDI"
|
mc:Ignorable="d"
|
Loaded="Window_Loaded"
|
Height="450" Width="800">
|
<Grid>
|
<Grid.RowDefinitions>
|
<RowDefinition/>
|
<RowDefinition/>
|
</Grid.RowDefinitions>
|
<TextBlock Text="99999999999999"/>
|
<!--停靠布局,让菜单栏和工具栏位于窗口顶部-->
|
<mdi:MdiContainer Name="Container" Grid.Row="1">
|
<mdi:MdiContainer.Menu>
|
<Menu DockPanel.Dock="Top">
|
<MenuItem Header="文件">
|
<!--菜单项为MenuItem,文字使用属性 Header-->
|
<MenuItem Name="newFile" Header="新建"></MenuItem>
|
|
</MenuItem>
|
<MenuItem Header="节点"></MenuItem>
|
<MenuItem Header="窗口" x:Name="WindowsMenu" x:FieldModifier="private" />
|
<MenuItem Header="关于"></MenuItem>
|
</Menu>
|
</mdi:MdiContainer.Menu>
|
</mdi:MdiContainer>
|
</Grid>
|
</Window>
|