The most interesting announcement for me from the Microsoft Build 2018 developer conference was the demo showing the use of UWP controls in WPF and WinForms apps. (https://youtu.be/ojZioTg5RUk?t=2250)
Specifically they used a control named UWPXamlHost
to achieve this functionality. So my questions would be:
Is this control already available as a preview somewhere and if not is there an expected time frame when it will be available? Will it be part of the UWP Community Toolkit?
Feel free to add any additional info you might have about this topic.
I expect it to be part of the Windows Community Toolkit, but I am not sure about the timeframe. As of May 2018 there has been no preview yet I am aware of, so I think we might have to wait for a while more. The only resource in the documentation is now this, which highlights the WebView
control, which is now part of the toolkit as a hosted control.
The control name is no longer UWPXamlHost. PR #2435 has already been merged which added a class called WindowsXamlHost, for both Windows Forms and WPF. The documentation is here: https://github.com/Microsoft/WindowsCommunityToolkit/blob/master/docs/controls/WindowsXAMLHost.md You can already get the pre-release NuGet of the Toolkit's 4.1 release to test it.
来源:https://stackoverflow.com/questions/50550895/uwpxamlhost-control-uwp-controls-in-desktop-apps-info-and-status