can we add silverlight application to tool box of asp.net web form application so that instead of writing HTML to include silverlight application i can just drag n drop it from tool box.
Asked
Active
Viewed 394 times
2 Answers
1
You can't add a silverlight app directly to the tool box. However its fairly simple to create a WebControl
whose Render
method writes out the appropriate <object>
element with the source param pointing at your applications xap.
You can even add some properties from which that your render code could generate an initparams <param>
element.
This WebControl
would automatically end up in the ToolBox allowing you to drag it on the design surface.
You might even consider detecting that the control is rendering in the design time and change the output to display a reasonable placemarker for it in the designer.

AnthonyWJones
- 187,081
- 35
- 232
- 306