DoItemEditor.xaml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <UserControl x:Class="MECF.Framework.UI.Core.Control.DoItemEditor"
  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. mc:Ignorable="d"
  9. d:DesignHeight="450" d:DesignWidth="800">
  10. <Grid>
  11. <DataGrid AutoGenerateColumns="False" Margin="5"
  12. Background="White" ItemsSource="{Binding DoItemList, Mode=OneWay}"
  13. SelectionMode="Single" SelectionUnit="FullRow"
  14. FontFamily="Arial,SimSun" FontSize="13"
  15. BorderThickness="0.1"
  16. CanUserDeleteRows="False" CanUserAddRows="False" IsReadOnly="True" >
  17. <DataGrid.Columns>
  18. <DataGridTextColumn Header="Index" Width="100" CanUserSort="True" IsReadOnly="True" Binding="{Binding Index,Mode=OneWay}">
  19. </DataGridTextColumn>
  20. <DataGridTextColumn Header="Name" Width="250" CanUserSort="True" IsReadOnly="True" Binding="{Binding Name,Mode=OneWay}">
  21. </DataGridTextColumn>
  22. <DataGridTextColumn Header="Address" Width="100" CanUserSort="True" IsReadOnly="True" Binding="{Binding Address,Mode=OneWay}">
  23. </DataGridTextColumn>
  24. <DataGridCheckBoxColumn Header="Value" Width="100" CanUserSort="True" IsReadOnly="True" Binding="{Binding BoolValue,Mode=OneWay}">
  25. </DataGridCheckBoxColumn>
  26. <DataGridTemplateColumn Header="Description" Width="300" >
  27. <DataGridTemplateColumn.CellTemplate>
  28. <DataTemplate>
  29. <TextBox Text="{Binding Description, Mode=OneWay }" TextWrapping="Wrap" FontSize="12"/>
  30. </DataTemplate>
  31. </DataGridTemplateColumn.CellTemplate>
  32. </DataGridTemplateColumn>
  33. </DataGrid.Columns>
  34. </DataGrid>
  35. </Grid>
  36. </UserControl>