Skip to main content

Microsoft Silverlight

Answered Question How can I obtain the ID of the silverlight host DIV?RSS Feed

(0)

SLQuest
SLQuest

Member

Member

10 points

11 Posts

How can I obtain the ID of the silverlight host DIV?

I have a silverlight control that can be dynamically loaded into a page. The control doesnt know the host div a priori, and needs to be able to reposition the DIV, or sometimes hide it. How can I achieve this?

Thanks.

luisabreu
luisabreu

Participant

Participant

1676 points

612 Posts

Answered Question

Re: How can I obtain the ID of the silverlight host DIV?

hello.

well, i'm not sure, but i think that there still is no property that letsyou get a reference to the html control that hosts the object that loads your silverlight control. what you might do is pass the id of the control through the startup parameters. unfortunately, i think that there's still a bug that might prevent you from getting that info from the webapplication, so you'll have to resort to a workaround:

http://msmvps.com/blogs/luisabreu/archive/2007/06/20/getting-your-initparams-from-managed-code.aspx

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities