AiItemEditor.xaml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <UserControl x:Class="MECF.Framework.UI.Core.Control.AiItemEditor"
  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:local="clr-namespace:MECF.Framework.UI.Core.Control"
  7. xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"
  8. xmlns:converters="clr-namespace:MECF.Framework.UI.Core.Converters"
  9. mc:Ignorable="d"
  10. d:DesignHeight="450" d:DesignWidth="700">
  11. <Control.Resources>
  12. <converters:BoolSensorConverter x:Key="BoolSensorConverter"></converters:BoolSensorConverter>
  13. </Control.Resources>
  14. <Grid>
  15. <DataGrid AutoGenerateColumns="False" Margin="5"
  16. Background="White" ItemsSource="{Binding AiItemList, Mode=OneWay}"
  17. SelectionMode="Single" SelectionUnit="FullRow"
  18. FontFamily="Arial,SimSun" FontSize="13"
  19. BorderThickness="0.1"
  20. CanUserDeleteRows="False" CanUserAddRows="False" IsReadOnly="True" >
  21. <DataGrid.Columns>
  22. <DataGridTextColumn Header="Index" Width="50" CanUserSort="True" IsReadOnly="True" Binding="{Binding Index,Mode=OneWay}">
  23. </DataGridTextColumn>
  24. <DataGridTextColumn Header="Name" Width="200" CanUserSort="True" IsReadOnly="True" Binding="{Binding Name,Mode=OneWay}">
  25. </DataGridTextColumn>
  26. <DataGridTextColumn Header="Address" Width="80" CanUserSort="True" IsReadOnly="True" Binding="{Binding Address,Mode=OneWay}">
  27. </DataGridTextColumn>
  28. <DataGridTextColumn Header="Feedback" Width="80" CanUserSort="True" IsReadOnly="True" Binding="{Binding ShortValue,Mode=OneWay}">
  29. </DataGridTextColumn>
  30. <DataGridTemplateColumn Header="Description" Width="300" >
  31. <DataGridTemplateColumn.CellTemplate>
  32. <DataTemplate>
  33. <TextBox Text="{Binding Description, Mode=OneWay }" IsReadOnly="True" IsEnabled="False" TextWrapping="Wrap" FontSize="12"/>
  34. </DataTemplate>
  35. </DataGridTemplateColumn.CellTemplate>
  36. </DataGridTemplateColumn>
  37. </DataGrid.Columns>
  38. </DataGrid>
  39. </Grid>
  40. </UserControl>