| | |
| | | Background="{StaticResource WorkspaceBackground}" |
| | | d:DesignHeight="450" d:DesignWidth="800"> |
| | | <UserControl.Resources> |
| | | <ResourceDictionary> |
| | | <!--<ResourceDictionary> |
| | | <ResourceDictionary.MergedDictionaries> |
| | | <ResourceDictionary Source="/HMI.UI;component/Style/PanuonDataGrid.xaml"/> |
| | | </ResourceDictionary.MergedDictionaries> |
| | | </ResourceDictionary> |
| | | </ResourceDictionary>--> |
| | | <CollectionViewSource x:Key="GroupFilter" Source="{Binding Parameters}"> |
| | | <CollectionViewSource.GroupDescriptions> |
| | | <PropertyGroupDescription PropertyName="ShowGroup" /> |
| | | </CollectionViewSource.GroupDescriptions> |
| | | </CollectionViewSource> |
| | | </UserControl.Resources> |
| | | <Grid> |
| | | <Grid.ColumnDefinitions> |
| | |
| | | </DockPanel> |
| | | |
| | | |
| | | <DataGrid Grid.Row="1" x:Name="parameterTable" Style="{StaticResource DefaultDataGrid}" SelectionMode="Single" |
| | | SelectedItem="{Binding SelectedParameter}" |
| | | ItemsSource="{Binding Parameters}"> |
| | | <DataGrid Grid.Row="1" x:Name="parameterTable" Style="{StaticResource DefaultDataGrid}" |
| | | SelectionMode="Single" |
| | | ItemsSource="{Binding Source={StaticResource GroupFilter}}" |
| | | SelectedItem="{Binding SelectedParameter}"> |
| | | <DataGrid.GroupStyle> |
| | | <GroupStyle> |
| | | <GroupStyle.ContainerStyle> |
| | | <Style TargetType="{x:Type GroupItem}"> |
| | | <Setter Property="Template"> |
| | | <Setter.Value> |
| | | <ControlTemplate TargetType="{x:Type GroupItem}"> |
| | | <Expander BorderThickness="0" Background="DarkCyan" |
| | | IsExpanded="True"> |
| | | <Expander.Header> |
| | | <TextBlock Text="{Binding Name}" FontSize="15" |
| | | Margin="8" |
| | | Foreground="#FFF"/> |
| | | </Expander.Header> |
| | | <Border Background="#FFF"> |
| | | <ItemsPresenter /> |
| | | </Border> |
| | | </Expander> |
| | | </ControlTemplate> |
| | | </Setter.Value> |
| | | </Setter> |
| | | </Style> |
| | | </GroupStyle.ContainerStyle> |
| | | </GroupStyle> |
| | | </DataGrid.GroupStyle> |
| | | |
| | | <DataGrid.Columns> |
| | | <DataGridTemplateColumn Header="" Width="Auto" CanUserResize="False"> |
| | | <DataGridTemplateColumn.CellTemplate> |
| | |
| | | <DataGridTextColumn Header="#" Binding="{Binding Converter={StaticResource rowNumber}, |
| | | RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type DataGridRow},AncestorLevel=1}}" |
| | | CanUserResize="False"/> |
| | | <DataGridTextColumn Width="*" Binding="{Binding Name}"> |
| | | <DataGridTextColumn Width="150" Binding="{Binding Name}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Pm.Parameter.Name}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="60" Binding="{Binding Type}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Pm.Parameter.Type}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="*" Binding="{Binding Value}"> |
| | |
| | | <TextBlock Text="{DynamicResource Pm.Parameter.Value}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="*" Binding="{Binding Unit}"> |
| | | <DataGridTextColumn Width="80" Binding="{Binding Unit}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Pm.Parameter.Unit}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="*" Binding="{Binding Description}"> |
| | | <DataGridTextColumn Width="120" Binding="{Binding Description}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Pm.Parameter.Desc}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | <DataGridTextColumn Width="*" Binding="{Binding PGroup}"> |
| | | <DataGridTextColumn Width="120" Binding="{Binding PGroup}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource Pm.Parameter.Group}"/> |
| | | </DataGridTextColumn.Header> |