Apply Css for Silverlight controls
-
Hi, I want to apply "Css" for Silverlight image control.I am having one silverlight image control in that left button down event i have to open asp.net form.For that aspx page i want to apply styles while opening that page.In left button down event i am calling java script function to call that aspx page.But from where i have to apply styles to open that page. If i use anchor tag to open popup window in normal aspx page I can use the following line to work it properly. <a style="font-family:Verdana; font-size:12px; font-weight:bold; text-decoration:none; color:#ffffff;" href="Contactus.aspx?TB_iframe=true&height=500&width=600" class="thickbox">Contact us</a> Here I am using class="thickbox" css class. But for now i want to open popup from code behind for that i have written following code in silverlight image control code behind. HtmlPage.Window.Invoke("login"); And I am calling that javascript function in aspx page like this. <script type="text/javascript"> function login() { var url = "http://219.91.199.132/Gateway/Login.aspx"; window.open( "UserLogin.aspx", 'window', 'width=630,height=620,background=silver,menubar=no, resizable=no') } </ script> Can anyone please help me how to apply css for silverlight controls. Thanks in advance Pavani
-
Hi, I want to apply "Css" for Silverlight image control.I am having one silverlight image control in that left button down event i have to open asp.net form.For that aspx page i want to apply styles while opening that page.In left button down event i am calling java script function to call that aspx page.But from where i have to apply styles to open that page. If i use anchor tag to open popup window in normal aspx page I can use the following line to work it properly. <a style="font-family:Verdana; font-size:12px; font-weight:bold; text-decoration:none; color:#ffffff;" href="Contactus.aspx?TB_iframe=true&height=500&width=600" class="thickbox">Contact us</a> Here I am using class="thickbox" css class. But for now i want to open popup from code behind for that i have written following code in silverlight image control code behind. HtmlPage.Window.Invoke("login"); And I am calling that javascript function in aspx page like this. <script type="text/javascript"> function login() { var url = "http://219.91.199.132/Gateway/Login.aspx"; window.open( "UserLogin.aspx", 'window', 'width=630,height=620,background=silver,menubar=no, resizable=no') } </ script> Can anyone please help me how to apply css for silverlight controls. Thanks in advance Pavani
CSS has nothing to do with Silverlight. Try asking on the Web Development board :) Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Hi, I want to apply "Css" for Silverlight image control.I am having one silverlight image control in that left button down event i have to open asp.net form.For that aspx page i want to apply styles while opening that page.In left button down event i am calling java script function to call that aspx page.But from where i have to apply styles to open that page. If i use anchor tag to open popup window in normal aspx page I can use the following line to work it properly. <a style="font-family:Verdana; font-size:12px; font-weight:bold; text-decoration:none; color:#ffffff;" href="Contactus.aspx?TB_iframe=true&height=500&width=600" class="thickbox">Contact us</a> Here I am using class="thickbox" css class. But for now i want to open popup from code behind for that i have written following code in silverlight image control code behind. HtmlPage.Window.Invoke("login"); And I am calling that javascript function in aspx page like this. <script type="text/javascript"> function login() { var url = "http://219.91.199.132/Gateway/Login.aspx"; window.open( "UserLogin.aspx", 'window', 'width=630,height=620,background=silver,menubar=no, resizable=no') } </ script> Can anyone please help me how to apply css for silverlight controls. Thanks in advance Pavani
As mentioned, there is no CSS styling to Silverlight controls as they are rendered inside the "Silverlight sandbox" in the browser. If you are looking to have a way to style controls, you should look at the
Style
element for your purposes. This allows you to create generic styles and then apply them to your controls, sort of the Silverlight "CSS equivalent." -
Hi, I want to apply "Css" for Silverlight image control.I am having one silverlight image control in that left button down event i have to open asp.net form.For that aspx page i want to apply styles while opening that page.In left button down event i am calling java script function to call that aspx page.But from where i have to apply styles to open that page. If i use anchor tag to open popup window in normal aspx page I can use the following line to work it properly. <a style="font-family:Verdana; font-size:12px; font-weight:bold; text-decoration:none; color:#ffffff;" href="Contactus.aspx?TB_iframe=true&height=500&width=600" class="thickbox">Contact us</a> Here I am using class="thickbox" css class. But for now i want to open popup from code behind for that i have written following code in silverlight image control code behind. HtmlPage.Window.Invoke("login"); And I am calling that javascript function in aspx page like this. <script type="text/javascript"> function login() { var url = "http://219.91.199.132/Gateway/Login.aspx"; window.open( "UserLogin.aspx", 'window', 'width=630,height=620,background=silver,menubar=no, resizable=no') } </ script> Can anyone please help me how to apply css for silverlight controls. Thanks in advance Pavani
One hack is to use 'initParams' to send these style values to silverlight control. There, you convert them into styles and apply them.