You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inconsistent control styles in a GridView after applying the Windows 11 theme. The issue is affecting the rendering of data within the GridView, causing it to display incorrectly.
List<User> items = new List<User>();
items.Add(new User() { Name = "John Doe", Age = 42 });
items.Add(new User() { Name = "Jane Doe", Age = 39 });
items.Add(new User() { Name = "Sammy Doe", Age = 13 });
items.Add(new User() { Name = "Donna Doe", Age = 13 });
lvUsers.ItemsSource = items;
User class -
public class User
{
public string Name { get; set; }
public int Age { get; set; }
}
Expected behavior
The data in the GridView should be rendered correctly, maintaining a consistent appearance and style.
Actual behavior
After applying the Windows 11 theme, the GridView exhibits inconsistent control styles, leading to data rendering issues. This behavior deviates from the expected appearance.
Regression?
Same code is working correctly with old theme styles.
Known Workarounds
No response
Impact
The inconsistent control styles in the GridView impacts the overall user experience.
Configuration
.NET 9
Windows 11
x64
Other information
No response
The text was updated successfully, but these errors were encountered:
Please note that the DataGrid has very similar issues with both Headers and Content.
I also noted that content in the datagrid is aligned to Top/Left by default and requires a lot of work to adjust, which I traced down to two missing TemplateBindings in the style definition for DataGridCell.
I suggest changing the definition of the ContentPresenter in the ControlTemplate defined in Styles\DataGrid.Xaml
Description
Inconsistent control styles in a GridView after applying the Windows 11 theme. The issue is affecting the rendering of data within the GridView, causing it to display incorrectly.
Reproduction Steps
XAML for GridView -
Code behind -
User class -
Expected behavior
The data in the GridView should be rendered correctly, maintaining a consistent appearance and style.
Actual behavior
After applying the Windows 11 theme, the GridView exhibits inconsistent control styles, leading to data rendering issues. This behavior deviates from the expected appearance.
Regression?
Same code is working correctly with old theme styles.
Known Workarounds
No response
Impact
The inconsistent control styles in the GridView impacts the overall user experience.
Configuration
.NET 9
Windows 11
x64
Other information
No response
The text was updated successfully, but these errors were encountered: