WPF versus Winforms: how to get a decent directory selection option
Posted: Thu Nov 19, 2020 2:25 pm
Hi Dick
Yet again you started an interesting exchange of views in this thread. So, I’ll add mine.
Comparing WPF and WinForms Text Boxes overlooks some very important points: The basic underlying point is that you are not comparing like with like.
.Net is a highly modularised “system of logic”. This allows for independent development of any control etc. safe in the knowledge that whatever way is chosen there needs to be no interaction (or read-across) from one way of doing things to the another, even though they may appear to be doing the same thing.
This “separation of concerns” is fundamental to the operation of .Net. From a developer’s point of view this implies a necessity to preserve such independence in any application code.
There are two ways of painting controls on screen. One is painting each pixel on an x/y canvas using x and y co-ordinates. The other is to use a vector-based approach, using some range and angle from a fixed origin.
And of course, one way can easily be converted to the other using appropriate projections.
The basic language of .Net is CIL. Upstream of this is C#* or a derivative, and downstream is a major subset of machine language determined by the processor – meaning that processing is effected fast and efficiently.
Despite this conversion represents a processing overhead which manifests itself in time taken to re-paint the screen. It is an undesirable and unnecessary overhead which can be prevented by using a Vector-based approach in the first place.
This principle can be traced through to a number of programming constructs outside the conceptual bounds of controls.
* C# is not the only upstream language for CIL. I have just read that the DoD has a version of ADA which targets CIL. This implies, to me at least, that concerns about performance and/or security can be overstated.
Terry
Yet again you started an interesting exchange of views in this thread. So, I’ll add mine.
Comparing WPF and WinForms Text Boxes overlooks some very important points: The basic underlying point is that you are not comparing like with like.
.Net is a highly modularised “system of logic”. This allows for independent development of any control etc. safe in the knowledge that whatever way is chosen there needs to be no interaction (or read-across) from one way of doing things to the another, even though they may appear to be doing the same thing.
This “separation of concerns” is fundamental to the operation of .Net. From a developer’s point of view this implies a necessity to preserve such independence in any application code.
There are two ways of painting controls on screen. One is painting each pixel on an x/y canvas using x and y co-ordinates. The other is to use a vector-based approach, using some range and angle from a fixed origin.
And of course, one way can easily be converted to the other using appropriate projections.
The basic language of .Net is CIL. Upstream of this is C#* or a derivative, and downstream is a major subset of machine language determined by the processor – meaning that processing is effected fast and efficiently.
Despite this conversion represents a processing overhead which manifests itself in time taken to re-paint the screen. It is an undesirable and unnecessary overhead which can be prevented by using a Vector-based approach in the first place.
This principle can be traced through to a number of programming constructs outside the conceptual bounds of controls.
* C# is not the only upstream language for CIL. I have just read that the DoD has a version of ADA which targets CIL. This implies, to me at least, that concerns about performance and/or security can be overstated.
Terry