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.
[quoted text, click to view] "schneider" <0000@0000.SPAM> wrote in message
news:OtBiTv1TEHA.2324@TK2MSFTNGP10.phx.gbl...
> 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
>
> "Andrew S (Infragistics)" <productmanager@infragistics.com> wrote in
message
> news:e94gpMxTEHA.2128@TK2MSFTNGP11.phx.gbl...
> > 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;
> >
> > "schneider" <0000@0000.SPAM> wrote in message
> > news:%23vd39WrTEHA.1548@TK2MSFTNGP11.phx.gbl...
> > > I think I found It.
> > >
> > > TypeDescriptor.CreateDesigner(component, gettype(idesigner))
> > >
> > > This sound correct?
> > >
> > > Any other details on using this method?
> > >
> > > Thanks,
> > >
> > > Schneider
> > >
> > >
> > > "schneider" <0000@0000.SPAM> wrote in message
> > > news:eaXuwQrTEHA.1244@TK2MSFTNGP10.phx.gbl...
> > > > 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
> > > >
> > > >
> > >
> > >
> >
> >
>
>