Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VNC control for WPF application

Tags:

wpf

vnc

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?

like image 984
ProfK Avatar asked Jul 12 '26 22:07

ProfK


2 Answers

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();
    
like image 170
Rick Sladkey Avatar answered Jul 14 '26 21:07

Rick Sladkey


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.

like image 44
markus s Avatar answered Jul 14 '26 21:07

markus s



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!