In WPF control - display a UWP app

雨燕双飞 提交于 2019-12-11 14:21:12

问题


https://docs.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-extend

This explains a process of showing a UWP app in a separate window than the WPF app. Is it possible to display them in the same window? Eg. display the UWP app inside a WPF control. Or even better : display a UWP control inside a WPF control.


回答1:


Things have changed and Windows now supports hosting UWP controls inside Win32 applications such as WPF or Windows Forms.

You can find documentation on XAML islands and the hosting process on https://docs.microsoft.com/en-us/windows/uwp/xaml-platform/using-the-xaml-hosting-api. The article also references sample apps that should help you get started.




回答2:


I consulted your issue with our team, and as Steven Wick mentioned:

It is currently not possible to display WPF and UWP UI/controls within the same window. A Desktop Bridge app can contain both WPF and UWP components, but their UI will need to reside in separate windows.

It seems like the UI betwwen WPF and UWP can't be mixed stuff, they may in different technologies.



来源:https://stackoverflow.com/questions/46784680/in-wpf-control-display-a-uwp-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!