问题
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