Roman Pelepei's .Net How To? Blog

Roman Pelepei gives smart answers on questions about C# .Net, ASP .Net, WPF and Silverlight programming with examples and source code.

четверг, 9 октября 2008 г.

How to Dynamically Load a Silverlight Control within another Silverlight Control

Let’s say your site is entirely written in Silverlight but you want to be able to load and run a different Silverlight application within your main Silverlight application/site. Currently this scenario is not directly supported in Silverlight. However, I have a work around that will more or less accomplish this scenario.

The way I do this is to add a second, hidden Silverlight control to your web page. I set the Source for this second Silverlight control to be empty (“”) until I want the Silverlight control to load and display. I also put the control in a DIV that is hidden. You can load and unload this control as well and you can dynamically set it to point to different XAP’s to load different applications in your site.
rpelepei на 05:14
Поделиться

Комментариев нет:

Отправить комментарий

‹
›
Главная страница
Открыть веб-версию

Обо мне

Моя фотография
rpelepei
Просмотреть профиль
Технологии Blogger.