PropertyGrid sees only public properties

From: Koen (kp_at_remove-this.bvdep.com)
Date: 02/08/05


Date: Tue, 8 Feb 2005 16:22:16 +0100

The things you can do with a propertygrid are fantastic. Howeveer all
properties you want to appear in the grid need to be public and all
properties that you want to be editable need to have a set accessor.
How can I make my class expose the properties differently for a PropertyGrid
than for normal use in the code?

Some more details: I want to use the propertygrid to edit resources. I
already have a class that can read/write these resources but I do not want
to change these resources at run-time, so I don't want a 'set' of the
properties to be publicly visible (malicious programmers are always around
to change some common resource). However a property grid is ideal to edit
the class and hence the resources I could do a run-time check in the set of
the property to see if the object is writable, but it is so much cleaner
that a call that will go through set is trapped by the compiler (like when
no set accessor exists) .
I also want to expose some properties in their full complexity while in
run-time they are simply exposed like strings. So the type of the property
would change between runtime and peropertygrid

Koen.



Relevant Pages

  • Re: PropertyGrid sees only public properties
    ... > properties that you want to be editable need to have a set accessor. ... I want to use the propertygrid to edit resources. ... > I also want to expose some properties in their full complexity while in ...
    (microsoft.public.dotnet.framework)
  • Re: History of term "Grid Computing"
    ... definitions of grid, you don't believe this, so ... within a large, global Grid project. ... My feeling is that the difficulties of actual deployment of a platform ... It doesn't help that the thing is very interconnected so that resources ...
    (comp.distributed)
  • Re: CellFormating function slowing down table refresh..
    ... i've solved that placing the images in the resources... ... tks anyway.. ... christiano. ... specially if your grid show several lines. ...
    (microsoft.public.dotnet.general)
  • Re: Shdoclc.dll
    ... so there is ZERO way of editing this file??? ... that can edit resources inside executables. ... just open the DLL there - make sure to choose Resources ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: Group/sum elements of a vector
    ... sorry if my question is stupid but I'm at the beginning of ... I have divided into a grid an area; for each square I calculate ... resources that can help the area, ...
    (comp.soft-sys.matlab)