Good GUI design, the .NET way?

  • Thread starter Thread starter Nick Farina
  • Start date Start date
N

Nick Farina

I am beginning work on what will be a rather large .NET application.

I have a treeview that I would like to be very "intelligent" in that
it represents some program data and automatically updates itself. I
am wondering what a good design pattern is.

Take the Solution Explorer in VS.NET for example. It is always up to
date, representing files, references, projects without ever needing to
"refresh" (though there is a refresh button, I never need it).

I doubt that, in VS.NET, whatever code is responsible for adding a
reference to your project is really aware of the Solution Explorer and
goes in there to the treeview and updates the "References" node
itself.

Instead, I imagine that there is a Project object, which contains a
ReferenceCollection object that has events to notify listeners when it
is changed. The Solution Explorer just hooks itself up to the
ReferenceCollection's "ReferenceChanged" event or something and
handles adding/removing nodes itself.

Am I on track here? Is this how it's done? That would mean that
every major application "object" and especially collections are going
to have a lot of events.

Nick
 
Back
Top