How to turn DLL to control?

K

kolja2003

Hi,
Is there somewhere the way to turn the any arbitrary DLL into control which
I can put in my ToolBox and use further in my RAD development.
I mean the way to create new control or component from any DLL so it will
expose its properties and events for turning in design time and unsing in my
application likewise we have now with controls from ToolBox.
I think such possibility will add greatly to RAD development in NET
enviroment.
Thanks.
 
P

Peter Rilling

No, because the designer works on controls and components and must have the
correct interface that the designer expects. You can definitely inherit all
classes from a Control, but that does not really make sense since most of
the classes that support an application have no UI behavior.

Also, it does not make sense to say "turn any arbitrary dll into..." since
the DLL is only a container for classes and other structures. What you are
really asking is, "is there a way to turn any arbitrary class into a control
....".
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

kolja2003 said:
Hi,
Is there somewhere the way to turn the any arbitrary DLL into control
which
I can put in my ToolBox and use further in my RAD development.
I mean the way to create new control or component from any DLL so it will
expose its properties and events for turning in design time and unsing in
my
application likewise we have now with controls from ToolBox.
I think such possibility will add greatly to RAD development in NET
enviroment.
Thanks.


You can get a class (control) in the toolbox if it expose the correct
interfaces , you cannot add a dll to the toolbox as per se, a DLL may have
several classes that are not intented to be used in a RAD environment.
Take a look at MSDN for further details about how to do such a control
 
S

Stoitcho Goutsev \(100\) [C# MVP]

Only Components can be added to the ToolBox (Controls are components also)
if you wan to be able to add a class to a the toolbox the your class should
implement IComponent interface. However for good design time support more
needs to be done. Keep in mind that not all classes make sense to be
designable.

I read in some blog that in Cider, which is code name for the designer in
WPF, IComponent will be removed and as the author said the only requirements
will be the class to inherit from Object :) which means all classes can be
added to the toolbox. I can't confirm this though.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top