| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <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:ed="http://schemas.microsoft.com/expression/2010/drawing"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
- xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
- xmlns:tc="clr-namespace:BehaviorTree;assembly=BehaviorTree"
- x:Class="TreeCanvas.TreeCanvasView"
- mc:Ignorable="d"
- d:DesignHeight="600" d:DesignWidth="800">
- <UserControl.CommandBindings>
- <CommandBinding Command="ApplicationCommands.New" Executed="NewNode_Executed" />
- </UserControl.CommandBindings>
- <UserControl.ContextMenu>
- <ContextMenu Name="cm">
- <MenuItem Header="New Node" Command="ApplicationCommands.New"
- CommandTarget="{Binding Path=PlacementTarget, RelativeSource={RelativeSource AncestorType=ContextMenu}}" />
- </ContextMenu>
- </UserControl.ContextMenu>
- <!--<Canvas Background="Transparent" Name="canvasTree">
-
- </Canvas>-->
- <Grid x:Name="LayoutRoot" Background="White">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <Rectangle Stroke="{x:Null}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Fill="{x:Null}" Margin="0,0,0,0"/>
- <tc:BehaviorPanel Root="O" HorizontalAlignment="Center" VerticalAlignment="Center" x:Name="tc" HorizontalBuffer="38" VerticalBuffer="48" HorizontalBufferSubtree="40" Margin="0,10,0,0">
- <tc:TreeNode x:Name="O" Content="O"/>
- <tc:TreeNode Content="E" TreeParent="O" x:Name="E" />
- <tc:TreeNode Content="F" TreeParent="O" x:Name="F"/>
- <tc:TreeNode Content="N" TreeParent="O" x:Name="N"/>
- <tc:TreeNode Content="A" TreeParent="E" x:Name="A"/>
- <tc:TreeNode Content="D" x:Name="D" TreeParent="E"/>
- <tc:TreeNode Content="B" x:Name="B" TreeParent="D"/>
- <tc:TreeNode Content="C" x:Name="C" TreeParent="D"/>
- <tc:TreeNode Content="G" x:Name="G" TreeParent="N"/>
- <tc:TreeNode Content="M" x:Name="M" TreeParent="N"/>
- <tc:TreeNode Content="H" x:Name="H" TreeParent="M"/>
- <tc:TreeNode Content="I" x:Name="I" TreeParent="M"/>
- <tc:TreeNode Content="J" x:Name="J" TreeParent="M"/>
- <tc:TreeNode Content="K" x:Name="K" TreeParent="M"/>
- <tc:TreeNode Content="L" x:Name="L" TreeParent="M"/>
- </tc:BehaviorPanel>
- <Button HorizontalAlignment="Center" VerticalAlignment="Top" Content="Create Dynamically" Grid.Row="1" Margin="0,14,0,5" x:Name="btnDynamic" Click="btnDynamic_Click"/>
- </Grid>
- </UserControl>
|