Question about visual designer attributes.

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
-----------------------------------
 
C

Chris Ellis

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top