How to migrate from UWP project to WPF?

Sachi 221 Reputation points
2022-02-28T10:41:00.597+00:00

Hi
i have a project in UWP i want it to migrate to WPF how can i proceed is there any API or any alternatives to do ?

Universal Windows Platform (UWP)
XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
772 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Hui Liu-MSFT 41,261 Reputation points Microsoft Vendor
    2022-03-01T01:34:55.537+00:00

    There is no simple way how to achieve that.

    XAML markup cannot be shared between UWP and WPF applications. They use different XAML parsers and different XAML "dialects".

    You could create a new WPF application from scratch and basically rewrite all the views. If you develop your application according to the recommended MVVM pattern, you should be able to reuse most of your application logic/view model code. You can place a view model in a portable class library and reference it from WPF applications and UWP applications. But the XAML view must be rewritten for the WPF application.

    Hope that helps.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.