MarcusWichelmann / MarcusW.VncClient

High-performance cross-platform VNC-Client library for C#
https://vnc-client.marcusw.de
MIT License
95 stars 28 forks source link

Xamarin Forms #6

Open peder2key opened 3 years ago

peder2key commented 3 years ago

Hello!

Very nice library!

Will this library be availble for xamarin.forms? Just wondering since you are using .net core.

Best regards

MarcusWichelmann commented 3 years ago

Hi,

you can embed this library into any frontend framework, but in case for Xamarin Forms, there is no finished control yet which you can just drop in and use. Instead, you will have to implement the interfaces IRenderTarget, IOutputHandler, .. manually to use the library in your Xamarin Forms application.

Please take a look at the Readme for hints about how this can be done. There is also a MarcusW.VncClient.Avalonia library that does exactly that and implements a ready-to-use control for the Avalonia UI framework. You can use this as a source of inspiration.

If you decide to implement the mentioned interfaces for Xamarin (Forms), I would love see a pull request for that. This way, others could re-use your Xarmarin Forms control and improve it. 😄

peder2key commented 3 years ago

Thank you for the answer :)

I just tried to add your pre-released nuget and that failed in my xamarin project with:

Package MarcusW.VncClient 1.0.0-alpha4 is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Package MarcusW.VncClient 1.0.0-alpha4 supports: netcoreapp3.1 (.NETCoreApp,Version=v3.1)

Maybe the nuget is just missing a dependency 👍

Would be nice to contribute with a xamarin control

MarcusWichelmann commented 3 years ago

This is because the library is based on .NET Core 3.1 instead of .NET Standard (which is no longer needed since .NET 5.0). If you update your application to .NET 5.0, it should work.

peder2key commented 3 years ago

I don't think xamarin is ready for .net5.0 yet:

Last may Microsoft announced .NET Multi-platform App UI (or MAUI for short); the future of Xamarin and Xamarin.Forms that makes Xamarin a first-class member of .NET. But, as this is such a big a change that it would not be able to be ready in time for .NET 5.0, so its postponed to version 6.0, expected to be released next year.

ref this post: https://www.mfractor.com/blogs/news/net-5-0-and-c-9-0-for-xamarin-developers

Best regards

MarcusWichelmann commented 3 years ago

Ah, thank you. I thought Xamarin (Forms) was already based on .NET 5.0. 😒

Hm, then I should probably multi-target this library and add .NET Standard 2.0/2.1 support. Will have to see, if all required APIs are available there.