Custom control design time attributes
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngcontrolscs' list.


Jiri Vyslouzil
-- Moved from [aspngcommunity] to [aspngcontrolscs] by Rachel Reese <Click here to reveal e-mail address> --

Hi everybody,

I'd like to ask question.
I'm trying to develop my first custom control. I found so many examples how
to add (in VS.NET) in design time to the properties window string or numeric
values that may affect the control.
But I couldn't find any example how to add something like "color picker" or
"image browser" ... etc. to the control's design time properties window.
Can anyone send me a piece of code (I prefer C#) or link with such example?

Have a nice day.

Reply to this message...
 
    
Paul D. Murphy

I believe that for color if your data type is System.Drawing.Color you
get the color picker for free (if not the color picker lives in
System.Windows.Forms.Design I think). Since the URL is a string you will
need to apply this attribute to the property.

[Editor("System.Web.Design.UrlEditor",
typeof(System.Web.Design.UITypeEditor))]

Paul

[Original message clipped]

Reply to this message...
 
 
System.Drawing.Color




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com