| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:Tree="clr-namespace:Tree"
- x:Class="Tree.AllTreeView"
- mc:Ignorable="d"
- d:DesignHeight="800"
- d:DesignWidth="1280"
- d:DataContext="{d:DesignInstance Tree:AllTreeViewModel}">
- <DockPanel>
- <Menu DockPanel.Dock="Top" Height="24">
- <MenuItem Header="File">
- <MenuItem Header="打开" Click="MenuItem_Open" />
- <MenuItem Header="保存" Click="MenuItem_Save" />
- <MenuItem Header="新建" Click="MenuItem_New" />
- </MenuItem>
- </Menu>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition></RowDefinition>
- <RowDefinition></RowDefinition>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="230"/>
- <ColumnDefinition Width="Auto"></ColumnDefinition>
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <GroupBox Grid.Row="0" Grid.Column="0" Header="行为树列表:">
- <ListBox Name="lbTreeId" ItemsSource="{Binding TreeList}" VerticalAlignment="Stretch" >
- <ListBox.ItemTemplate>
- <DataTemplate DataType="Tree:TreeInfoViewModel">
- <StackPanel MouseLeftButtonDown="OnMouseLeftButtonDown" Orientation="Horizontal" Margin="1,0">
- <Label Content="{Binding Id}" VerticalAlignment="Stretch" Width="20" ></Label>
- <Label Content="{Binding Comment}" VerticalAlignment="Stretch" Width="150"></Label>
- </StackPanel>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </GroupBox>
- <GroupBox Grid.Row="1" Grid.Column="0" Header="节点编辑:">
- <Tree:NodeDataEditor x:Name="nodeDataEditor" VerticalAlignment="Top" />
- </GroupBox>
- <GridSplitter Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" Width="3" ShowsPreview="False" VerticalAlignment="Stretch"
- HorizontalAlignment="Stretch" />
- <Tree:TreeView x:Name="treeView" Grid.Row="0" Grid.Column="2" Grid.RowSpan="2" />
- </Grid>
- </DockPanel>
- </UserControl>
|