[Feature] Markup Extensions for WinUI 2.x #4630
michael-hawker
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the problem this feature would solve
We have some great icon based Markup Extensions in the Toolkit. However, they only work for System XAML controls as WinUI 2.x has their own fork of the base
IconSource
type elements. This means they can't mix and match. 😟Describe the solution
We need to move things to WinUI 3 specific versions eventually, so what we should do is copy these implementations ahead of time in the new
CommunityToolkit
namespace specific for WinUI 2.x + 3. In this way we support both options where needed based on eitherxmlns:ui="using:Microsoft.Toolkit.Uwp.UI"
orxmlns:ui="using:CommunityToolkit.WinUI.UI"
(finally realizing this is a weird namespace... 🤦♂️).This way devs upgrading to WinUI 3 for this don't have to change a thing for WinUI 2 usages and only update the System based ones. Since a WinUI 3 dev wouldn't be using the UWP package, there should be no conflict/issue with including the separate new CommunityToolkit based namespace implementation in the UWP package (even if it is a bit out of place).
Describe alternatives you've considered
We could just ship alternate named ones for either WinUI or make the current ones WinUI based and ship different names System ones, but the latter involves a break that a dev needs to be aware of, and in both cases it still involves a breaking namespace change with the move to WinUI 3.
With the proposed solution above, the existing namespace change with migration to WinUI 3 for existing system base usages remain, but then we support WinUI 2 based usages with no breaking change to WinUI 3 in the future.
Beta Was this translation helpful? Give feedback.
All reactions