Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. Apply Css for Silverlight controls

Apply Css for Silverlight controls

Scheduled Pinned Locked Moved WPF
csharpjavajavascriptcssasp-net
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pavanip
    wrote on last edited by
    #1

    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

    M J P 3 Replies Last reply
    0
    • P pavanip

      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

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      CSS has nothing to do with Silverlight. Try asking on the Web Development board :) Mark

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      1 Reply Last reply
      0
      • P pavanip

        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

        J Offline
        J Offline
        Jeremy Likness
        wrote on last edited by
        #3

        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."

        1 Reply Last reply
        0
        • P pavanip

          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

          P Offline
          P Offline
          PumbaPumba
          wrote on last edited by
          #4

          One hack is to use 'initParams' to send these style values to silverlight control. There, you convert them into styles and apply them.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups