DataSeriesEdit.xaml 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <UserControl x:Class="Aitex.UI.Charting.View.DataSeriesEdit"
  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:chartConvert="clr-namespace:Aitex.UI.Charting.Converter"
  7. mc:Ignorable="d"
  8. d:DesignHeight="289" d:DesignWidth="838">
  9. <UserControl.Resources>
  10. <chartConvert:LineColorConverter x:Key="colorConverter"/>
  11. <Style TargetType="{x:Type Label}">
  12. <Setter Property="Foreground" Value="Black"/>
  13. </Style>
  14. </UserControl.Resources>
  15. <DataGrid x:Name="dataGrid_DataList" Grid.Row="1" AutoGenerateColumns="False"
  16. ItemsSource="{Binding CommonViewModel.RenderableSeries, Mode=TwoWay}" SelectionMode="Extended" SelectionUnit="FullRow">
  17. <DataGrid.Resources>
  18. <!--<ObjectDataProvider x:Key="PointDisplayType" MethodName="GetValues" ObjectType="{x:Type zed:SymbolType}">
  19. <ObjectDataProvider.MethodParameters>
  20. <x:Type Type="zed:SymbolType"/>
  21. </ObjectDataProvider.MethodParameters>
  22. </ObjectDataProvider>-->
  23. </DataGrid.Resources>
  24. <DataGrid.Columns>
  25. <DataGridTemplateColumn Width="65">
  26. <DataGridTemplateColumn.HeaderTemplate >
  27. <DataTemplate>
  28. <TextBlock Text="{DynamicResource GlobalLableVisible}" />
  29. </DataTemplate>
  30. </DataGridTemplateColumn.HeaderTemplate>
  31. <DataGridTemplateColumn.CellTemplate>
  32. <DataTemplate>
  33. <CheckBox IsChecked="{Binding IsVisible,Mode=TwoWay}" Tag="{Binding UniqueId}" Checked="OnChangeDrawingItemVisibility" Unchecked="OnChangeDrawingItemVisibility"/>
  34. </DataTemplate>
  35. </DataGridTemplateColumn.CellTemplate>
  36. </DataGridTemplateColumn>
  37. <DataGridTextColumn Width="200*" Binding="{Binding DataSourceName,Mode=OneWay}" CanUserSort="True" IsReadOnly="True">
  38. <DataGridTextColumn.HeaderTemplate >
  39. <DataTemplate>
  40. <TextBlock Text="{DynamicResource GlobalLableDataSource}" />
  41. </DataTemplate>
  42. </DataGridTextColumn.HeaderTemplate>
  43. <DataGridTextColumn.CellStyle>
  44. <Style TargetType="DataGridCell">
  45. <Setter Property="ToolTip" Value="{Binding DataSourceName}" />
  46. </Style>
  47. </DataGridTextColumn.CellStyle>
  48. </DataGridTextColumn>
  49. <DataGridTextColumn Width="200*" Binding="{Binding SeriesDisplayName,Mode=OneWay}" CanUserSort="True" CanUserReorder="False" IsReadOnly="True">
  50. <DataGridTextColumn.HeaderTemplate >
  51. <DataTemplate>
  52. <TextBlock Text="{DynamicResource GlobalLableDataName}" />
  53. </DataTemplate>
  54. </DataGridTextColumn.HeaderTemplate>
  55. <DataGridTextColumn.CellStyle>
  56. <Style TargetType="DataGridCell">
  57. <Setter Property="ToolTip" Value="{Binding SeriesDisplayName}" />
  58. </Style>
  59. </DataGridTextColumn.CellStyle>
  60. </DataGridTextColumn>
  61. <DataGridTextColumn Width="200*" Binding="{Binding DisplayName,Mode=TwoWay}" CanUserSort="True" IsReadOnly="False">
  62. <DataGridTextColumn.HeaderTemplate >
  63. <DataTemplate>
  64. <TextBlock Text="{DynamicResource GlobalLableChartingName}" />
  65. </DataTemplate>
  66. </DataGridTextColumn.HeaderTemplate>
  67. <DataGridTextColumn.CellStyle>
  68. <Style TargetType="DataGridCell">
  69. <Setter Property="ToolTip" Value="{Binding DisplayName}" />
  70. </Style>
  71. </DataGridTextColumn.CellStyle>
  72. </DataGridTextColumn>
  73. <DataGridTemplateColumn Width="70" CanUserSort="True">
  74. <DataGridTemplateColumn.HeaderTemplate >
  75. <DataTemplate>
  76. <TextBlock Text="{DynamicResource GlobalLableColor}" />
  77. </DataTemplate>
  78. </DataGridTemplateColumn.HeaderTemplate>
  79. <DataGridTemplateColumn.CellTemplate>
  80. <DataTemplate>
  81. <Button Focusable="False" FontSize="11" Height="20" Tag="{Binding UniqueId}" Background="{Binding SeriesColor,Mode=TwoWay,Converter={StaticResource colorConverter}}" Click="OnChangeLineColor"/>
  82. </DataTemplate>
  83. </DataGridTemplateColumn.CellTemplate>
  84. </DataGridTemplateColumn>
  85. <DataGridTextColumn Width="60" Binding="{Binding Factor,Mode=TwoWay}" CanUserSort="True" IsReadOnly="False" >
  86. <DataGridTextColumn.HeaderTemplate >
  87. <DataTemplate>
  88. <TextBlock Text="{DynamicResource GlobalLableFactor}" />
  89. </DataTemplate>
  90. </DataGridTextColumn.HeaderTemplate>
  91. </DataGridTextColumn>
  92. <DataGridTextColumn Width="60" Binding="{Binding Offset,Mode=TwoWay}" CanUserSort="True" IsReadOnly="False" >
  93. <DataGridTextColumn.HeaderTemplate >
  94. <DataTemplate>
  95. <TextBlock Text="{DynamicResource GlobalLableOffset}" />
  96. </DataTemplate>
  97. </DataGridTextColumn.HeaderTemplate>
  98. </DataGridTextColumn>
  99. <!--<DataGridComboBoxColumn Width="45" Header="线型" CanUserSort="True" IsReadOnly="False" />-->
  100. <DataGridTextColumn Width="75" Binding="{Binding LineThickness,Mode=TwoWay}" CanUserSort="True" IsReadOnly="False" >
  101. <DataGridTextColumn.HeaderTemplate >
  102. <DataTemplate>
  103. <TextBlock Text="{DynamicResource GlobalLableThickness}" />
  104. </DataTemplate>
  105. </DataGridTextColumn.HeaderTemplate>
  106. </DataGridTextColumn>
  107. <DataGridTemplateColumn Header=" " Width="50" CanUserSort="True">
  108. <DataGridTemplateColumn.CellTemplate>
  109. <DataTemplate>
  110. <Button Content="{DynamicResource GlobalLableExport}" FontSize="11" Height="20" Tag="{Binding UniqueId}" Click="OnExportingData2File"/>
  111. </DataTemplate>
  112. </DataGridTemplateColumn.CellTemplate>
  113. </DataGridTemplateColumn>
  114. <DataGridTemplateColumn Header="" Width="70" CanUserSort="True">
  115. <DataGridTemplateColumn.CellTemplate>
  116. <DataTemplate>
  117. <Button Content="{DynamicResource GlobalLableDelete}" FontSize="11" Height="20" Tag="{Binding UniqueId}" Click="OnRemoveChartingItem"/>
  118. </DataTemplate>
  119. </DataGridTemplateColumn.CellTemplate>
  120. </DataGridTemplateColumn>
  121. </DataGrid.Columns>
  122. </DataGrid>
  123. </UserControl>