Question about visual designer attributes.

  • Thread starter Thread starter Ken Varn
  • Start date Start date
K

Ken Varn

I have a custom control class in which I want to disable certain properties
in the VS.Net visual designer if other properties have certain values. Can
this be done with design time attributes?

I was hoping to be able to apply an attribute to a property and to change
the attribute for the property at run-time depending on the value of another
property. I sort of looked at DesignTimeVisibleAttribute, but it only works
on classes. Is there something similar for properties?



--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------
 
Ken,

You might want to try creating your own custom designer. I believe that
if you look into the subject you will find that it can do everything that
you require. I wanted to remove all of the inherited properties from my
user controls except for the ones that I specified. I accomplished that
with a custom designer and a few custom attributes. Here's an article that
I found very helpful on the subject:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/custdsgnrdotnet.asp

Hope this helps,
Chris
 
Back
Top