UWPXamlHost control - UWP controls in desktop apps - Info and Status?

妖精的绣舞 提交于 2019-12-06 15:34:07

问题


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.


回答1:


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.




回答2:


A quick update on this: the Windows Community Toolkit has this functionality available in a PR now, which should go into an upcoming release (4.0?) of the toolkit.

  • Docs for Windows XAML Host: PR #2331
  • PR with WPF-wrapped UWP controls (and framework for creating your own): PR #2299



回答3:


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

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