Hosting WPF control in MAUI Windows targeted application

Fabrice Leal 61 Reputation points
2022-11-07T09:00:36.407+00:00

WinForms allows hosting of WPF controls (Element host) and vice versa (WindowsFormHost).

Is this (hosting a WPF control extending System.Windows.Controls.Control) possible in a MAUI Windows targeted application?

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,908 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 35,966 Reputation points Microsoft Vendor
    2022-11-08T02:58:40.18+00:00

    Hello,

    No, there is no such an API in MAUI to host a WPF control extending System.Windows.Controls.Control on MAUI,

    This is because the technology stack of MAUI and WPF applications is different, in MAUI, Windows applications are developed based on WinUI 3.

    You could refer to Windows UI Library in the Windows App SDK (WinUI 3) to get more details about it.

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful