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
{{ message }}
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
[Feature] Take WinUI 2.x as a dependency to resolve XAML Style conflicts #3598
Currently we try and base the Toolkit controls on top of the system included generic.xaml styles. This can potentially be hazardous as different OS versions contain different styles; however, they have been more stable as late. This is mostly due to all updates to styles being provided within the WinUI 2.x packages.
However, this now means that if someone includes both the Toolkit and WinUI 2.x in their project, the overridden default styles from WinUI 2 and conflict with the assumptions made for us building the Toolkit controls from the OS styles.
Describe the solution
If we take a hard dependency on WinUI 2 (which could help with the transition to WinUI 3 later anyway), then we can ensure that we target all our styles to build on top of the more stable set of styles included in the specific version of WinUI 2.x that we target. Then we can just tell developers to ensure they use the compatible WinUI 2 version and/or we ensure to ship updates when new WinUI 2 packages are shipped.
Describe alternatives you've considered
Trying to only target system styles or include extra copies of properties needed from updated styles.
Additional context & Screenshots
This would not be something we fix for 7.0 I believe. It's be a question if adding this dependency would require a major version rev and be a 'breaking change' or if we could do it in a 7.1/7.2 update?
Activity
michael-hawker commentedon Nov 4, 2021
We did this in 7.0, closing.