PC Review


Reply
Thread Tools Rate Thread

Adding code property to control property window

 
 
NuBBeR
Guest
Posts: n/a
 
      7th Oct 2004
I have created a boolean property in a custom control and i would like that
property to be visible in the control's property windows in the designer.
Does anyone know how to do this? Thanks in advace!


 
Reply With Quote
 
 
 
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      7th Oct 2004
NuBBeR,

If the property is public, then it should show up. If you want it to
show up in a particular category, then you can add the Category attribute
from the System.ComponentModel namespace, and it will show up in the
particular category that you pass through the constructor of the attribute.
For example:

[Category("My Category")]
public bool MyProperty { ...

The MyProperty property will show up in a category named "My Category".
You can also specify other categories that already exist, and they will be
included in those.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"NuBBeR" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>I have created a boolean property in a custom control and i would like that
>property to be visible in the control's property windows in the designer.
>Does anyone know how to do this? Thanks in advace!
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding items to property window Chris Microsoft VB .NET 2 6th Jun 2005 09:31 PM
UserControl Enum Property Bold in WinForms Property window Kakaiya Microsoft Dot NET 0 15th Apr 2005 03:37 AM
can a custom control have an image property that can be set in design time from the property browser? news.austin.rr.com Microsoft Dot NET Compact Framework 3 3rd Mar 2005 02:08 AM
Adding a usercontrol's property in the property window Zyrthofar Blackcloak Microsoft VB .NET 2 29th Aug 2004 03:46 AM
How to throw and catch an exception in the property set when property is bound to a wiform control Keith Roe Microsoft Dot NET Framework 2 4th Dec 2003 05:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:30 AM.