Can Windows Forms support be added? #2613
Replies: 4 comments 8 replies
-
It could, but it is not something that I will work on. And I don't know if you need it because you could also use our Eto.Forms option: https://www.nuget.org/packages/Eto.Forms Considerations: One of our guidelines is, support less and support that better, but since we already have a lot of platforms adding another will not costs a lot of maintenance. We already have most of our code in shared projects. In this case we could probably also share most of the MapControl.cs code between Eto.Forms and Windows.Forms. There is a Windows.Forms SkiaSharp View so that is also not a problem https://www.nuget.org/packages/SkiaSharp.Views.WindowsForms/ btw, I was surprisded to see a Windows.Forms talk on .NET Conf, though it was dead https://learn.microsoft.com/en-us/shows/dotnetconf-2023/whats-new-with-winforms. |
Beta Was this translation helpful? Give feedback.
-
Thank you, I will use SkiaSharp Views SKControl in” SkiaSharp.Views.WindowsForms“ implements the IMapControl interface as the base class. It should be possible to use Mapsui in WinForm. Thank you very much for developing this basic library, which makes cross platform easier. |
Beta Was this translation helpful? Give feedback.
-
You should do it like in the Maui implementation. If you use SKControl as base class, you always have a CPU supported control and can never change to a GPU supported control without recompiling Mapsui. And GPU support is much faster than CPU support. That said, implementing IMapControl in a Panel and then add a SKControl or SKGLControl respecting the UseGPU flag would be the better way. |
Beta Was this translation helpful? Give feedback.
-
Ok, also these two problems are solved. The TrackBar is still a problem, because it could only use integers, but Viewport.Rotation is double. This is not a problem of Mapsui.WindowsForms, but from TrackBar. But I don't want to add any other control for this. |
Beta Was this translation helpful? Give feedback.
-
Support for Windows Forms can be increased. Because some existing platforms have high requirements for computer performance, and Windows Forms are also a common and fast way to send messages. Developers can focus on algorithms rather than beautifying the interface.
Beta Was this translation helpful? Give feedback.
All reactions