Re: create enumerated property for custom control
- From: "Mike MacMillan" <mikejmacmillan@xxxxxxxxx>
- Date: 29 Dec 2005 17:01:16 -0800
Sergey,
any properties who's type are an enum will be bound to that list of
values in design mode. if you view properties of the control/class
who's property you'd like to edit, if one is an enum, VS will display a
dropdownlist with the values from the enum as a list of available
choices.
Mike MacMillan
Sergey Poberezovskiy wrote:
> Mike,
>
> I was not asking about the DesignTimeHtml - I know how to use that...
> The question was about how to implement a property similar to say,
> BorderStyle, so that when user selects the property in the Properties window
> the valid values are listed in the dropdown box.
>
> Hope that makes sense..
>
> "Mike MacMillan" wrote:
>
> > Sergey,
> > any custom information you'd like displayed by the IDE is design mode
> > is up to you to implement. take a look at the ControlDesigner class
> > and its associated members, as that will give you a headstart for
> > providing custom design-time support for your controls. here's a link
> > to the SDK:
> >
> >
> > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuidesigncontroldesignerclasstopic.asp
> >
> > hope this helps,
> > Mike MacMillan
> >
> > Sergey Poberezovskiy wrote:
> > > Hi,
> > >
> > > I want to create a property that can only accept values from my custom list.
> > > Say
> > > 1, 5, 10, 15, 20, 30.
> > >
> > > I know I can easily create an enumeration with values set to those from my
> > > list, and have the Visual Studio designer display a list of enumerated
> > > strings shown in the property (e.g. one, five, ten, etc.).
> > >
> > > What I want is a list of numbers shown in the IDE - and I have no idea how to
> > > do that...
> > >
> > > Any help is greatly appreciated.
> >
> >
.
- Follow-Ups:
- Re: create enumerated property for custom control
- From: Sergey Poberezovskiy
- Re: create enumerated property for custom control
- References:
- Re: create enumerated property for custom control
- From: Mike MacMillan
- Re: create enumerated property for custom control
- Prev by Date: Re: create enumerated property for custom control
- Next by Date: Re: create enumerated property for custom control
- Previous by thread: Re: create enumerated property for custom control
- Next by thread: Re: create enumerated property for custom control
- Index(es):
Relevant Pages
|