From 082088a146ac4434634309e82aad7c202f5ce2ca Mon Sep 17 00:00:00 2001 From: "Milko Venkov (INFRAGISTICS INC)" Date: Mon, 29 Jun 2026 12:32:12 +0300 Subject: [PATCH 1/2] Fix focus on DataGrid column headers (3018981) --- .../WPFGallery/Views/Collections/DataGridPage.xaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Sample Applications/WPFGallery/Views/Collections/DataGridPage.xaml b/Sample Applications/WPFGallery/Views/Collections/DataGridPage.xaml index 36b915f00..ee43a553c 100644 --- a/Sample Applications/WPFGallery/Views/Collections/DataGridPage.xaml +++ b/Sample Applications/WPFGallery/Views/Collections/DataGridPage.xaml @@ -33,12 +33,18 @@ + XamlCode="<DataGrid ItemsSource="{Binding ViewModel.ProductsCollection, Mode=TwoWay}"> <DataGrid.ColumnHeaderStyle> <Style BasedOn="{StaticResource {x:Type DataGridColumnHeader}}" TargetType="DataGridColumnHeader"> <Setter Property="Focusable" Value="True" /> </Style> </DataGrid.ColumnHeaderStyle> </DataGrid>"> + ItemsSource="{Binding ViewModel.ProductsCollection, Mode=TwoWay}"> + + + + From d8870ccfc20814fd47538dbd15c7590f4b529915 Mon Sep 17 00:00:00 2001 From: "Milko Venkov (INFRAGISTICS INC)" Date: Mon, 6 Jul 2026 16:07:09 +0300 Subject: [PATCH 2/2] Inset column header focus visual so it isn't clipped --- .../Views/Collections/DataGridPage.xaml | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Sample Applications/WPFGallery/Views/Collections/DataGridPage.xaml b/Sample Applications/WPFGallery/Views/Collections/DataGridPage.xaml index ee43a553c..884391052 100644 --- a/Sample Applications/WPFGallery/Views/Collections/DataGridPage.xaml +++ b/Sample Applications/WPFGallery/Views/Collections/DataGridPage.xaml @@ -20,6 +20,24 @@ Foreground="{DynamicResource TextFillColorPrimaryBrush}" mc:Ignorable="d"> + + + + @@ -33,7 +51,7 @@ + XamlCode="<DataGrid ItemsSource="{Binding ViewModel.ProductsCollection, Mode=TwoWay}"> <DataGrid.ColumnHeaderStyle> <Style BasedOn="{StaticResource {x:Type DataGridColumnHeader}}" TargetType="DataGridColumnHeader"> <Setter Property="Focusable" Value="True" /> <Setter Property="FocusVisualStyle" Value="{StaticResource ColumnHeaderFocusVisualStyle}" /> </Style> </DataGrid.ColumnHeaderStyle> </DataGrid>">