Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / June 2004

Tip: Looking for answers? Try searching our database.

How do I get the ControlDesigner for a control?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
schneider - 10 Jun 2004 07:30 GMT
Anyone tell me how to get the ControlDesigner for any control?

I need to check the selection rules, and other things.

A samle would be great, or a website...

Thanks,

Schneider
schneider - 10 Jun 2004 07:42 GMT
I think I found It.

TypeDescriptor.CreateDesigner(component, gettype(idesigner))

This sound correct?

Any other details on using this method?

Thanks,

Schneider

> Anyone tell me how to get the ControlDesigner for any control?
>
[quoted text clipped - 5 lines]
>
> Schneider
Andrew S \(Infragistics\) - 10 Jun 2004 18:53 GMT
Actually I do not believe that is not correct since that will create a new
instance of the designer class for a control. What you want to do is use the
GetService method of the component to get the idesignerhost service. Then
use its GetDesigner method.
e.g.
IDesignerHost host = this.GetService(typeof(IDesignerHost)) as
IDesignerHost;
ControlDesigner designer = host.GetDesigner(this) as ControlDesigner;

> I think I found It.
>
[quoted text clipped - 17 lines]
> >
> > Schneider
schneider - 11 Jun 2004 03:30 GMT
That assumes that I have a host, but I don't currently need one.

Anyway, what I am trying to use the methods on the controlDesigner, and
derrived types.

I need to call CanBeparentedTo, CanParent

anyone know how?

seems you can only inherit thoes classes, and nothing else..

Thanks,

Schneider

> Actually I do not believe that is not correct since that will create a new
> instance of the designer class for a control. What you want to do is use the
[quoted text clipped - 26 lines]
> > >
> > > Schneider
Andrew Smith \(Infragistics\) - 11 Jun 2004 14:41 GMT
Well this is the designtime newsgroup so I assumed you were acting at
designtime and therefore would be able to get to the IDesignerHost. In
anycase, the methods you mention are public methods on the ControlDesigner
and ParentControlDesigner classes so you can call them once you have the
designer instance. Of course going the route you're going, you're going to
have to initialize the designer with its component and also be responsible
for disposing the designer.

> That assumes that I have a host, but I don't currently need one.
>
[quoted text clipped - 42 lines]
> > > >
> > > > Schneider
schneider - 11 Jun 2004 18:09 GMT
thanks

"Andrew Smith (Infragistics)" <productmanager@infragistics.com> wrote in
message news:OsZkWn7TEHA.972@TK2MSFTNGP10.phx.gbl...
> Well this is the designtime newsgroup so I assumed you were acting at
> designtime and therefore would be able to get to the IDesignerHost. In
[quoted text clipped - 55 lines]
> > > > >
> > > > > Schneider

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.