Open KeesBL opened 1 year ago
An update: the exception (System.InvalidOperationException: ''ContentControl' TargetType does not match type of element 'DataGridColumnFloatingHeader'.') occurs reliably when dragging DataGrid or WPF UI DataGrid columns to reorder them.
Hey I am facing the same issue, Were you able to find any solution or disable reordering ?
Setting CanUserReorderColumns to False disables the behavior, but of course also disables users' ability to reorder their grids. Hopefully a temporary fix!
I have the same error. Hope it can be fixed soon :)
I have fixed it,https://github.com/MahApps/MahApps.Metro/issues/1315
just set a style for datagrid @KeesBL @AndreasKleinb
Describe the bug
Sorting the data grid several times in quick succession will cause an exception: "System.InvalidOperationException: ''ContentControl' TargetType does not match type of element 'DataGridColumnFloatingHeader'.'" The issue isn't reproducible every time, but does happen consistently. A stack trace from the exception is attached.
WPF UI DataGrid Exception Stack Trace.txt
To Reproduce
Run Wpf.Ui.Demo and switch to the Data page. Scroll to the WPF UI DataGrid. Click the headers quickly, the exception happens pretty reliably for me within about 15 seconds.
Expected behavior
I'd expect the control to be able to be sorted quickly without raising an exception that crashes the program.
Screenshots
No response
OS version
Windows 11 Enterprise 22H2, 22621.1105
.NET version
.NET 7.0
WPF-UI NuGet version
2.0.3
Additional context
No response