Hi
I've got a control that has a property in the Behavior section, it has
3 options, depending upon this property's selection I want to hide or
show other property's, because the user won't need access to them
unless they've selected the appropriate selection on the property in
Behavior.
Is there any easy way to do this? I will most likely need to the same
thing on quite a few controls so re-useability would be nice.
thanks,
Kris Wragg
Vijay - 25 Apr 2006 03:03 GMT
I am not sure how this would be done with exact syntax... but I believe you
have to alter the attribute browseable to false for a property
[Browseable(false)]
public property MyTest
{
// get and set constructors..
}
Now if you want to do this dynamically in code.. I believe using reflection
is the only way.... to do it... check below link
http://msdn2.microsoft.com/en-us/library/system.componentmodel.browsableattribut
e.browsable(VS.80).aspx
VJ
> Hi
>
[quoted text clipped - 10 lines]
>
> Kris Wragg
jokiz - 10 May 2006 10:19 GMT
you'd have to implement ICustomTypeDescriptor and alter the returned
propertyinfo collection on the GetProperties method
jokiz - 10 May 2006 10:27 GMT
you'd have to implement ICustomTypeDescriptor and alter the returned
propertyinfo collection on the GetProperties method