-
-
Notifications
You must be signed in to change notification settings - Fork 764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataGridRow not highlighted when selected and hovered on #410
Comments
- `DataGridRow`s are now highlighted on mouse click and select by adding a custom style that fixes (lepoco/wpfui#410) - `PackagesDataGrid` now does not overflow the home page and instead properly displays a scroll bar. - Also fixed a misc nullability warning in MainWindow.xaml.cs
Added implementation based on Windows Community Toolkit's DataGrid control. Should fix lepoco#410.
When i apply this fix the selected color seems too dark when the theme is on light and if you change it back and forth from dark/theme then its normal. Dark doesn't seems to have this issue. The grid text seems to to be aligned on top. |
You can try to change the opacity in the
Try editing the style, find any |
This should be implemented. |
Will this style issue be resolved soon? Without this selected style, the datagrid is incomplete. |
@pomianowski is there a chance for this to get some attention please, or are you now fully focused on transferring WPF-UI to WPF? I (and I guess many other devs) am using DataGrid a lot and having no selection highlight for me is a major obstacle, so I would really appreciate it if this got properly implemented. |
A fix has been implemented here, but someone will need to clean it up and open an actual PR. Feel free to use that code in your own fork long as you put my name as a co-author in the commit. |
Describe the bug
DataGridRow not highlighted when selected and hovered on.
To Reproduce
Expected behavior
Screenshots
WPF.UI.2022-09-27.10-37-21.mp4
OS version
Windows 11 22H2
.NET version
.NET 6.0.401
WPF-UI NuGet version
Built from source, development branch commit 299a90e.
Additional context
This is due to the
VisualState
s for the WPFUI defaultDataGridRow
style are not implemented:wpfui/src/Wpf.Ui/Styles/Controls/DataGrid.xaml
Lines 226 to 371 in 299a90e
I have a sample implementation based on the
WindowsCommunityToolkit
'sDataGrid
for UWP:which gives this result:
The Windows Community Toolkit implementation basically:
Note that unlike other WPFUI controls such as
TreeViewItem
, the sampleDataGridRow
implementation does not have a0:0:0.16
animation duration. Everything happens instantly similar to the WCTDataGrid
.If the code and screenshot above seem appropriate please let me know so I can open a pull request with it.
The text was updated successfully, but these errors were encountered: