MahApps.Metro: CheckBox performance is very bad
Describe the bug
Compared to the built-in WPF checkbox style, the rendering performance is really bad. Perhaps due to the massive amount of attached properties?
I saw some PRs that added fallback values, and have tried that but it didn’t help with rendering speed. Only thing that works is removing the checkboxes or going back to WPF’s own style.
Steps to reproduce
A description of how to trigger this bug.
- Add a listbox with am item template with a checkbox and some other stuff, such as some of the MahApps icons 🙂
- Add several hundred items.
- Virtualization can be enabled or disabled, it doesn’t matter.
- Scroll, and see how laggy it is.
Expected behavior
It should not lag.
Actual behavior
It lags.
Environment
MahApps.Metro version: v2.4.9
Windows build number: Win10 22H1
Visual Studio: 2022
Target Framework: .NET v4.7.2, also .NET 6.0.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 18 (12 by maintainers)
@Nuklon I‘ll remove all attached properties which related to Brushes and which can be done by overriding Xaml keyed stuff. I’ll this change after my holiday.
@Nuklon FYI https://github.com/dotnet/wpf/issues/4468
Yeah, can do, will try to do this weekend.