NodeDataEditor.xaml 2.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. <UserControl x:Class="Modules.BehaviorTreeModule.NodeDataEditor"
  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:tree="clr-namespace:Modules.BehaviorTreeModule"
  7. mc:Ignorable="d" Height="200" DataContextChanged="OnDataContextChanged"
  8. d:DataContext="{d:DesignInstance tree:TreeNodeViewModel}" VerticalContentAlignment="Stretch" HorizontalAlignment="Stretch" d:DesignWidth="242">
  9. <UserControl.Resources>
  10. <tree:ListToStringConverter x:Key="ListToStringConverter"/>
  11. </UserControl.Resources>
  12. <Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
  13. <Grid.RowDefinitions>
  14. <RowDefinition Height="*"/>
  15. <RowDefinition Height="*"/>
  16. <RowDefinition Height="*"/>
  17. <RowDefinition Height="5*"/>
  18. </Grid.RowDefinitions>
  19. <Grid.ColumnDefinitions>
  20. <ColumnDefinition Width="40"/>
  21. <ColumnDefinition Width="*"/>
  22. </Grid.ColumnDefinitions>
  23. <Label Content="ID :" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalAlignment="Top" VerticalContentAlignment="Stretch" Height="30"/>
  24. <Label Content="类型:" Grid.Row="1" Grid.Column="0" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalAlignment="Top" Height="30"/>
  25. <Label Content="参数:" Grid.Row="2" Grid.Column="0" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalAlignment="Top" Height="30"/>
  26. <Label Content="备注:" Grid.Row="3" Grid.Column="0" HorizontalAlignment="Left" HorizontalContentAlignment="Center" VerticalAlignment="Top" Height="30"/>
  27. <Label Name="lblId" Grid.Column="1" Grid.Row="0" Content="{Binding Id}" HorizontalAlignment="Stretch"/>
  28. <ComboBox Name="cbType" Grid.Column="1" Grid.Row="1" Margin="2" SelectionChanged="CbType_OnSelectionChanged" HorizontalAlignment="Stretch"/>
  29. <TextBox Name="tbArgs" Grid.Column="1" Grid.Row="2" Margin="2" Text="{Binding Args, Converter={StaticResource ListToStringConverter}, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Stretch"/>
  30. <TextBox Name="tbComment" Grid.Column="1" Grid.Row="3" Margin="2" Text="{Binding Comment, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Stretch"/>
  31. </Grid>
  32. </UserControl>