question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: Adopt WinUI 2.4 in an existing UWP application

See original GitHub issue

Hello,

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:

  1. It seems that not all controls from Windows.UI.Xaml.Controls have been migrated to Microsoft.UI.Xaml.Controls (e.g StackPanel is missing from Microsoft.UI.Xaml.Controls). Is there any documentation related to the gap between these two namespaces?

  2. Is it expected that once we identify all the Windows.UI.Xaml.Controls classes that can be migrated to Microsoft.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?

  3. 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:closed
  • Created 3 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
StephenLPeterscommented, Aug 19, 2020

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.

1reaction
StephenLPeterscommented, Sep 16, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

WinUI 2.4 Release Notes - Windows apps
Release notes for WinUI 2.4 including new features and bug fixes.
Read more >
Migrate from UWP to the Windows App SDK
A collection of topics describing and demonstrating how to migrate your Universal Windows Platform (UWP) application to the Windows App SDK.
Read more >
Can you use WinUI in an existing Windows app? - YouTube
Can you use WinUI in an existing Windows app ? | One Dev Question. 1.9K views · 2 years ago ...more. Windows Developer....
Read more >
Microsoft wants to close the UWP, Win32 divide with ' ...
Microsoft wants to close the UWP, Win32 divide with 'Windows Apps'. Is Microsoft's UWP going away? Is the Microsoft Store on its way...
Read more >
Leverage the power of WinUI, the future of native Windows ...
A beginner's guide to building Windows applications with WinUI for UWP and ... to UWP applications; Discover how to modernize your existing Win32...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found