.NetGrid v2.8.5 has been released. New features and bug fixes

The new version includes several bug fixes and new features added to Dapfor’s framework. The following features have been added: [NEW] added new DecimalFormat and a corresponding DecimalFormatAttribute for declarative formatting. public class Product { private decimal price; [DecimalFormat(Precision = 3, ShortForm = true, ShowZero = false)] public decimal Price { get { return price; [...]

Binding list and thread safety

Data binding is the basis of modern applications based on separation of data layer from presentation layer. The main purpose of such separation is to make application logic independent of its representation. Otherwise, logic code should not directly call presentation layer class methods (i.e. Control class methods). When internal state changes, business logic layer sends [...]

Correct organization of event processing in a separate thread

Multithreaded application became something common. The main reason for that is execution of resource-intensive tasks in parallel to GUI without stopping it for long operations. As it is well known, the easiest way for asynchronous data processing used by ThreadPool. This method is not only the easiest, but also very efficient. Notwithstanding its merits, it [...]

How to avoid exceptions upon exiting application

Almost every modern application is multi-threaded. Threads are needed to work with various devices and IP protocol stack and to perform demanding computing operations. Results of work performed in these threads should be displayed in graphical controls. Control.Invoke / Control.BeginInvoke are the main methods used for thread synchronization.  These methods work excellent only when control [...]

Performance of synchronization with GUI thread

It is well known that all graphical controls should work in one thread. There are many articles on this subject, so we shall not repeat them. In multi-threaded applications every call should be synchronized with the main thread containing windows message loop. Control is a base class that provides Control.Invoke and Control.BeginInvoke methods. The first [...]