diff options
Diffstat (limited to 'Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/FileSystemControl.xaml')
| -rw-r--r-- | Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/FileSystemControl.xaml | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/FileSystemControl.xaml b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/FileSystemControl.xaml index ec490e893..7230d97fb 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/FileSystemControl.xaml +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/FileSystemControl.xaml @@ -7,6 +7,14 @@ <converters:ByteArrayToFileSizeConverter x:Key="ByteArrayToFileSizeConverter" /> <converters:DateTimeUtcToLocalDateTime x:Key="DateTimeUtcToLocalDateTime" /> + <Style TargetType="{x:Type local:FileSystemDataGridRow}" BasedOn="{StaticResource {x:Type DataGridRow}}"> + <Setter Property="DoubleClickCommand" Value="{Binding RelativeSource={RelativeSource AncestorType=local:FileExplorerControl},Path=ItemDoubleClickedCommand}"></Setter> + </Style> + + <Style TargetType="{x:Type local:FileSystemDataGrid}" BasedOn="{StaticResource {x:Type DataGrid}}"> + + </Style> + <Style x:Key="FileSystemCellStyle" TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> <Setter Property="BorderThickness" Value="0"/> <Setter Property="FocusVisualStyle" Value="{x:Null}"/> @@ -92,7 +100,7 @@ </Style.Triggers> </Style> </Grid.Style> - <DataGrid x:Name="PART_datagrid" ItemsSource="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=CurrentItem.Items}" CellStyle="{StaticResource FileSystemCellStyle}"> + <local:FileSystemDataGrid x:Name="PART_datagrid" ItemsSource="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=CurrentItem.Items}" CellStyle="{StaticResource FileSystemCellStyle}"> <DataGrid.Style> <Style TargetType="DataGrid" BasedOn="{StaticResource {x:Type DataGrid}}"> <Setter Property="Background" Value="Transparent"></Setter> @@ -119,11 +127,6 @@ <DataGridTemplateColumn.CellTemplate> <DataTemplate> <DockPanel Background="Transparent"> - <DockPanel.InputBindings> - <MouseBinding MouseAction="LeftDoubleClick" - Command="{Binding RelativeSource={RelativeSource AncestorType=local:FileExplorerControl},Path=ItemDoubleClickedCommand}" - CommandParameter="{Binding}" /> - </DockPanel.InputBindings> <Image Width="18" Height="18" RenderOptions.BitmapScalingMode="Fant" Stretch="Uniform" HorizontalAlignment="Center" VerticalAlignment="Center"> <Image.Style> <Style TargetType="Image"> @@ -150,11 +153,6 @@ <DataGridTemplateColumn.CellTemplate> <DataTemplate> <DockPanel Background="Transparent"> - <DockPanel.InputBindings> - <MouseBinding MouseAction="LeftDoubleClick" - Command="{Binding RelativeSource={RelativeSource AncestorType=local:FileExplorerControl},Path=ItemDoubleClickedCommand}" - CommandParameter="{Binding}" /> - </DockPanel.InputBindings> <TextBlock Text="{Binding DateModified,Converter={StaticResource DateTimeUtcToLocalDateTime}}" VerticalAlignment="Center"></TextBlock> </DockPanel> </DataTemplate> @@ -164,11 +162,6 @@ <DataGridTemplateColumn.CellTemplate> <DataTemplate> <DockPanel Background="Transparent"> - <DockPanel.InputBindings> - <MouseBinding MouseAction="LeftDoubleClick" - Command="{Binding RelativeSource={RelativeSource AncestorType=local:FileExplorerControl},Path=ItemDoubleClickedCommand}" - CommandParameter="{Binding}" /> - </DockPanel.InputBindings> <TextBlock Text="{Binding Description}" VerticalAlignment="Center"></TextBlock> </DockPanel> </DataTemplate> @@ -178,11 +171,6 @@ <DataGridTemplateColumn.CellTemplate> <DataTemplate> <DockPanel Background="Transparent"> - <DockPanel.InputBindings> - <MouseBinding MouseAction="LeftDoubleClick" - Command="{Binding RelativeSource={RelativeSource AncestorType=local:FileExplorerControl},Path=ItemDoubleClickedCommand}" - CommandParameter="{Binding}" /> - </DockPanel.InputBindings> <TextBlock Text="{Binding Size,Converter={StaticResource ByteArrayToFileSizeConverter}}" VerticalAlignment="Center"> <TextBlock.Style> <Style TargetType="TextBlock"> @@ -200,7 +188,7 @@ </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> </DataGrid.Columns> - </DataGrid> + </local:FileSystemDataGrid> </Grid> </Grid> </Border> @@ -208,5 +196,5 @@ </Setter.Value> </Setter> </Style> - + </ResourceDictionary>
\ No newline at end of file |
