127 lines
5.3 KiB
XML
127 lines
5.3 KiB
XML
<Window xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="using:ZTools.ViewModels"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
x:Class="ZTools.Views.MainWindow"
|
|
x:DataType="vm:MainWindowViewModel"
|
|
Title="ZTools">
|
|
|
|
<Design.DataContext>
|
|
<!-- This only sets the DataContext for the previewer in an IDE,
|
|
to set the actual DataContext for runtime, set the DataContext property in code (look at App.axaml.cs) -->
|
|
<vm:MainWindowViewModel />
|
|
</Design.DataContext>
|
|
|
|
<DockPanel Name="MainDockPanel">
|
|
<!-- 菜单 -->
|
|
<DockPanel Name="MenuDockPanel"
|
|
Width="70"
|
|
Dock="Left">
|
|
<Grid>
|
|
<ListBox SelectionMode="Single"
|
|
ItemsSource="{Binding MenuItems}"
|
|
SelectedItem="{Binding SelectedMenuItem}"
|
|
VerticalAlignment="Top">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid ColumnDefinitions="40,40" RowDefinitions="Auto,Auto" VerticalAlignment="Center"
|
|
HorizontalAlignment="Center">
|
|
<Image Grid.Row="0" Grid.Column="0" Width="20" Height="20"
|
|
Source="{Binding ItemIcon}" />
|
|
<TextBlock Grid.Row="1" Grid.Column="0" Width="20" FontSize="10"
|
|
Text="{Binding ItemName}" />
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
<ListBox Name="leftDownList"
|
|
SelectionMode="Single"
|
|
ItemsSource="{Binding LeftDownItems}"
|
|
SelectedItem="{Binding SelectedMenuItem}"
|
|
VerticalAlignment="Bottom">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid ColumnDefinitions="40,40" RowDefinitions="Auto,Auto" VerticalAlignment="Center"
|
|
HorizontalAlignment="Center">
|
|
<Image Grid.Row="0" Grid.Column="0" Width="20" Height="20"
|
|
Source="{Binding ItemIcon}" />
|
|
<TextBlock Grid.Row="1" Grid.Column="0" Width="20" FontSize="10"
|
|
Text="{Binding ItemName}" />
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</Grid>
|
|
</DockPanel>
|
|
<!-- <Border x:Name="Menu" -->
|
|
<!-- Width="70" -->
|
|
<!-- Background="Gainsboro" -->
|
|
<!-- BorderBrush="Black" -->
|
|
<!-- BorderThickness="0,0,2,0" -->
|
|
<!-- CornerRadius="3" -->
|
|
<!-- DockPanel.Dock="Left"> -->
|
|
<!-- <DockPanel> -->
|
|
<!-- -->
|
|
<!-- </DockPanel> -->
|
|
<!-- </Border> -->
|
|
|
|
<Border Name="resizeThumb"
|
|
Width="5"
|
|
Background="Gray"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Stretch">
|
|
</Border>
|
|
|
|
<!-- 二级菜单 -->
|
|
<DockPanel Name="SecondMenuDockPanel"
|
|
Background="Blue"
|
|
Width="240"
|
|
Dock="Left">
|
|
<!-- 功能 -->
|
|
<Grid Name="myGrid" HorizontalAlignment="Left" VerticalAlignment="Top">
|
|
<!-- <Grid.ColumnDefinitions> -->
|
|
<!-- <ColumnDefinition Width="Auto" /> -->
|
|
<!-- <ColumnDefinition Width="Auto" /> -->
|
|
<!-- <ColumnDefinition Width="Auto" /> -->
|
|
<!-- ~1~ 这里可以添加更多列,或者根据需要在代码中动态添加 @1@ -->
|
|
<!-- </Grid.ColumnDefinitions> -->
|
|
</Grid>
|
|
</DockPanel>
|
|
<!-- <Border Width="240" -->
|
|
<!-- Background="Gainsboro" -->
|
|
<!-- BorderBrush="Black" -->
|
|
<!-- BorderThickness="0,0,2,0" -->
|
|
<!-- CornerRadius="3" -->
|
|
<!-- DockPanel.Dock="Left"> -->
|
|
<!-- </Border> -->
|
|
|
|
<Border Name="resizeThumb1"
|
|
Width="5"
|
|
Background="Gray"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Stretch">
|
|
</Border>
|
|
|
|
<!-- 具体功能区 -->
|
|
<DockPanel Name="FunctionDockPanel"
|
|
Background="Orange"
|
|
Dock="Left">
|
|
<Border
|
|
Background="MistyRose"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Stretch">
|
|
<TextBlock>ccccc</TextBlock>
|
|
</Border>
|
|
</DockPanel>
|
|
<!-- <Border Background="Gainsboro" -->
|
|
<!-- BorderBrush="Black" -->
|
|
<!-- Padding="10" -->
|
|
<!-- CornerRadius="3" -->
|
|
<!-- DockPanel.Dock="Left"> -->
|
|
<!-- </Border> -->
|
|
|
|
</DockPanel>
|
|
|
|
</Window> |