TreeCanvasView.xaml 1.4 KB

123456789101112131415161718192021222324252627282930
  1. <UserControl
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing" x:Class="Module.TreeCanvas.TreeCanvasView"
  7. mc:Ignorable="d"
  8. d:DesignHeight="600" d:DesignWidth="800" xmlns:my="clr-namespace:Controls.BehaviorView;assembly=BehaviorView">
  9. <UserControl.Resources>
  10. <RoutedUICommand x:Key="Commands.DeleteSelectedNodes" />
  11. <RoutedUICommand x:Key="Commands.CreateNode" />
  12. </UserControl.Resources>
  13. <UserControl.CommandBindings>
  14. <CommandBinding Command="{StaticResource Commands.DeleteSelectedNodes}" Executed="DeleteSelectedNodes_Executed" />
  15. <CommandBinding Command="{StaticResource Commands.CreateNode}" Executed="CreateNode_Executed" />
  16. </UserControl.CommandBindings>
  17. <UserControl.ContextMenu>
  18. <ContextMenu>
  19. <MenuItem Header="Create Node" Command="{StaticResource Commands.CreateNode}" ToolTip="Creates a new node" />
  20. </ContextMenu>
  21. </UserControl.ContextMenu>
  22. <Canvas>
  23. <TextBox Canvas.Left="296" Canvas.Top="271" Height="23" Name="textBox1" Width="120" />
  24. <my:BehaviorNode Canvas.Left="279" Canvas.Top="151" Content="ListBoxItem" Height="42" Name="behaviorNode1" Width="120" />
  25. </Canvas>
  26. </UserControl>