Disable a property in Design view?

L

Lars Netzel

Hello,

Making your own WebCustomControl, how you do disable properties in the
design view?

For example my WebCustomControl does not use text, so the default property
Font is missleading when it's editable. I want to disable that Property in
Design view.

Any hints?

best regards
/Lars Netzel
 
W

William F. Robertson, Jr.

You can remove the visibility of a property with the Browsable attribute.

[Browsable(false)]
public string DisabledProperty
{
get { return _DisabledProperty; }
set { _DisabledProperty = value; }
}

It will no longer show up in the designer's property window.

HTH,

bill
 

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

Members online

No members online now.

Forum statistics

Threads
473,778
Messages
2,569,605
Members
45,238
Latest member
Top CryptoPodcasts

Latest Threads

Top