<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:Modules.BehaviorTreeModule"
		x:Class="Modules.BehaviorTreeModule.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>
	</Menu>
	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition/>
			<RowDefinition/>
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="230"/>
			<ColumnDefinition Width="Auto"/>
			<ColumnDefinition />
		</Grid.ColumnDefinitions>
		<GroupBox Grid.Row="0" Grid.Column="0" Header="行为树列表:">
			<ListBox Name="lbTreeRoots" ItemsSource="{Binding RootList}" VerticalAlignment="Stretch" >
				<ListBox.ContextMenu>
					<ContextMenu>
						<MenuItem Header="新建树" Click="MenuItem_New" />
						<MenuItem Header="删除树" Click="MenuItem_Remove" />
					</ContextMenu>
				</ListBox.ContextMenu>
				<ListBox.ItemTemplate>
					<DataTemplate DataType="Tree:TreeNodeViewModel">
						<StackPanel MouseLeftButtonDown="ListBoxItem_OnMouseLeftButtonDown" MouseLeftButtonUp="ListBoxItem_OnMouseLeftButtonUp" 
									Orientation="Horizontal" Margin="1,0">
							<Label Content="{Binding TreeId}" VerticalAlignment="Stretch" Width="20"/>
							<Label Content="{Binding Comment}" VerticalAlignment="Stretch" Width="150"/>
						</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>