Question: Adopt WinUI 2.4 in an existing UWP application
See original GitHub issueHello,
I’m trying to wrap my ahead around the steps required adopt WinUI 2.4 in an existing UWP application.
I have read the docs and also browsed the code in Xaml-Controls-Gallery and I would like to double check that I understood the migration path correctly.
Therefore, I have a few questions:
-
It seems that not all controls from
Windows.UI.Xaml.Controls
have been migrated toMicrosoft.UI.Xaml.Controls
(e.gStackPanel
is missing fromMicrosoft.UI.Xaml.Controls
). Is there any documentation related to the gap between these two namespaces? -
Is it expected that once we identify all the
Windows.UI.Xaml.Controls
classes that can be migrated toMicrosoft.UI.Xaml.Controls
we need to manually edit all of.xaml
and.cs
files to point to the new namespace (e.g.xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
/using MUXC = Microsoft.UI.Xaml.Controls;
)? Are there any tools / plans to automate this process? -
How come there are no Visual Studio templates for creating a new UWP application using WinUI 2.4? (I did notice that there are WinUI 3 preview templates on the marketplace)
Thank you, Cosmin
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (7 by maintainers)
Top GitHub Comments
There are quite a few bug fixes to the controls which exist in both name spaces, so I think that I would encourage you to take a look at this doc https://docs.microsoft.com/en-us/uwp/api/microsoft.ui.xaml.controls?view=winui-2.4, identify the controls which you are using from the Wux namespace and update to the Mux version to pick up those fixes. Unfortunately there is not a good tooling story for updating your app automatically.
Do note however that Winui 2 includes updated styles for many of the in box xaml controls. So when you import the Winui 2 package you might notice the visuals of some of your controls update. The updated styles conform to the Windows fluent design system so we’d suggest using them, we’ve also done our best to try to make sure they wont break apps which update to them, however your mileage may vary.