MarcusW.VncClient
MarcusW.VncClient copied to clipboard
Added Wpf support (control and sample)
I conformed to the Avalonia example as much as I could, but I gave up trying to learn ReactiveUI so I did not use it at all.
I built this for .NET 6... the pipeline uses .NET 3.1. How do you want to proceed?
Hey @paviad, I was looking for a wpf integration for MarcusWVnc and just found your pull request. It works like a charm to connect and interact with my vnc server but i have one problem with it: When i try to disconnect the client by using the CloseAsync method of the RfbConnection, it won't disconnect and just give me an OperationCanceledException. Did you test this case in your integration? You have any idea what could be the issue?
I honestly do not remember, last I touched this project was end of 2021, and I haven't used it since. I'll see if I can find the time to have a look.
Thanks for taking your time to answer me. In the meantime i found out that the problem was on my side. I mishandled the cancelation token. Your implementation works just as intented. Thanks again for providing a wpf implementation.,
I've incorporated #26 into my fork at #12 (https://github.com/paviad/MarcusW.VncClient)
I added an in memory client using the Skia library (Windows)
Incorporated PR #28 into this one
Some comments from my end about the sample:
- Autoresize doesn't work. It seems that you are setting it based on the ActualHeight and ActualWidth which is incorrect due to being in a ScrollViewer. The ScrollViewer width and height likely changes AFTER the event is called so you are sending the incorrect ActualWidth and ActualHeight, so no resize actually happens on the server-side.
- ErrorMessage is not displayed unless the connection succeeds
- No input for the Password field?
Some comments from my end about the sample:
- Autoresize doesn't work. It seems that you are setting it based on the ActualHeight and ActualWidth which is incorrect due to being in a ScrollViewer. The ScrollViewer width and height likely changes AFTER the event is called so you are sending the incorrect ActualWidth and ActualHeight, so no resize actually happens on the server-side.
- ErrorMessage is not displayed unless the connection succeeds
- No input for the Password field?
Fixed last two issues (error message and interactive password)
Regarding auto size, I couldn't reproduce the problem you mention, even though I am using ActualWidth
and ActualHeight
, when I actually tested it it worked fine with or without scroll bars on the view, see this video:
Incorporated PR #29 into this one (for Avalonia and Wpf)