VNC control for WPF application

我的未来我决定 提交于 2019-12-10 20:34:07

问题


I'm looking for a control that will allow me to host a VNC client session on a WPF window. Initial Googling has yielded nothing for WPF, only WinForms, so if nobody can point me to a WPF control, I would appreciate any advice on using a WinForms VNC control in a WPF application. That is, how can I host a VNC client session in a WPF application?


回答1:


I recommend going with the WinForms control in a WPF applications approach. It's really pretty simple.

  • Add WindowsFormsIntegration reference to your project
  • Add a WinForms integration element in your XAML:

    <WindowsFormsHost Name="host"/>
    
  • Add your WinForms control to that element in the code-behind:

    host.Child = new WinFormsControl();
    



回答2:


A WinForms Control hosted in WPF has a major drawback. DeveloperExpress documented the issue for their LayoutManager component like that: http://documentation.devexpress.com/#WPF/CustomDocument7551

Here is a WPF Implementation of VNCSharp called VncSharpWpf: http://d.hatena.ne.jp/horus531/20110515/1305443108

Both implementations are not the fastest in comparison to (other) native implementations. If anyone finds a better one, I would appreciate to know.



来源:https://stackoverflow.com/questions/4654939/vnc-control-for-wpf-application

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