PropertyGrid.axaml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <UserControl x:Class="SukiUI.Controls.PropertyGrid"
  2. xmlns="https://github.com/avaloniaui"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:controls="clr-namespace:SukiUI.Controls"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. Name="self"
  8. d:DesignHeight="450"
  9. d:DesignWidth="800"
  10. mc:Ignorable="d">
  11. <!-- TODO inject these styles, so that one can customize them -->
  12. <UserControl.Styles>
  13. <Style Selector="TextBlock.Label">
  14. <Setter Property="HorizontalAlignment" Value="Left" />
  15. <Setter Property="VerticalAlignment" Value="Center" />
  16. <Setter Property="FontSize" Value="14" />
  17. <Setter Property="Text" Value="{Binding DisplayName}" />
  18. <Setter Property="Grid.Column" Value="0" />
  19. <Setter Property="TextAlignment" Value="Center" />
  20. </Style>
  21. <Style Selector="NumericUpDown.NumberSelector">
  22. <Setter Property="HorizontalAlignment" Value="Right" />
  23. <Setter Property="MinWidth" Value="120"></Setter>
  24. <Setter Property="VerticalAlignment" Value="Center" />
  25. <Setter Property="HorizontalContentAlignment" Value="Right" />
  26. <Setter Property="FontSize" Value="14" />
  27. <Setter Property="Value" Value="{Binding Value}" />
  28. <Setter Property="Grid.Column" Value="2" />
  29. <Setter Property="IsReadOnly" Value="{Binding IsReadOnly}" />
  30. <Setter Property="Height" Value="36" />
  31. </Style>
  32. <Style Selector="Grid.Row">
  33. <Setter Property="Height" Value="40" />
  34. <Setter Property="Margin" Value="12,4,4,0" />
  35. </Style>
  36. </UserControl.Styles>
  37. <ScrollViewer>
  38. <ItemsControl ItemsSource="{Binding #self.Instance.Categories}" />
  39. </ScrollViewer>
  40. </UserControl>