Compact Framework a lightweight GUI platform?

Winform on CF is a bit heavy; initializing a large number of window handles takes a lot of time and memory. Another problem is the lack of built-in double buffering and the lack of control over the user interface, which means that during intensive operations with the processor, the user interface can leave the user half the screen displayed. Nice!

To alleviate this problem, I would request a lightweight management structure, is there one knockout already or do you have a homegrown?

Lightweight, I mean the control library, which allows you to fully control the color of the controls and does not use many expensive Windows handles.

NOTE. Please do not assume that I am using the UI thread too much. This is not the case.

+4
source share
4 answers

I came across this the other day, which may be useful, at least as a starting point: Fuild - Windows Mobile.NET Touch Controls , The appearance is nice, but development time support is not required. I'm not too good at memory, etc., but everything works with double buffering, and the performance seems pretty good.

+2
source

Ok, just an idea from the head ...

How to create a synchronization object, for example. a critical section or single lock in your application shared between your worker and gui threads. Turn off the paint. When you start drawing, block all other threads, so that you do not remain with a half-painted screen until they intimidate the processor.

(this, of course, assumes that presenting a beautiful picture for you is the most important thing you require;))

+1
source

Actually, you can override the drawing event.

And the idea is that you upload long operations to a separate thread. In fact, this is no different from any other events. Anything that relies on handling a Paint event will be susceptible to this.

In addition, there is no system that allows you to determine when a drawing event will be raised. Such an event is usually raised by a layer of the window manager, which is located outside the application (or even the frame). You can handle this event yourself and just do not do the work for a while, but I would not recommend it.

0
source

a little slower, and you cannot control the drawing event, so during intensive operations with the processor, the user interface can leave the user looking at the translucent screen.

This is generally a bad idea for performing expensive tasks in a user interface thread. For your user interface to be responsive, these tasks must be completed .

0
source

Source: https://habr.com/ru/post/1276471/


All Articles