Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 68315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:23:50+00:00 2026-05-10T19:23:50+00:00

I have created a nice silverlight control doing exactly what I want it to

  • 0

I have created a nice silverlight control doing exactly what I want it to do, and it looks great 🙂 When I host it in the test projects ASPX sample file or the HTML sample file it shows up nicely.

I now have to use the control in my existing ASP.NET 2.0 project, which has a fancy design. The problem I’m having is that the control don’t show up exactly how it should:

  • The loading progress don’t show
  • The control usually don’t become visible before I move my mouse over the aria where it’s contained

Obviously it’s something with my HTML/CSS design causing this, but it will be extremely time consuming to find the issue – so does anyone have knowledge in this area? What are the rules around how to make sure the control is displayed properly? What CSS properties should be used?

PS: Since I have a 2.0 app, I’m using the object tag approach to Silverlight, and it’s contained in a DIV with height and width set in style.

Code snippet was requested. It’s something like this (basically a copy of the HTML test page from the silverlight test project (which work perfectly)):

<div id='silverlightControlHost' style='height: 300px; width: 750px;'>     <object data='data:application/x-silverlight,' type='application/x-silverlight-2-b2'     width='100%' height='100%'>     <param name='source' value='Contiki.SilverLight.FileUploader.xap' />     <param name='onerror' value='onSilverlightError' />     <param name='background' value='white' />                                 <a href='http://go.microsoft.com/fwlink/?LinkID=115261' style='text-decoration: none;'>         <img src='http://go.microsoft.com/fwlink/?LinkId=108181' alt='Get Microsoft Silverlight'         style='border-style: none' />     </a>     </object>     <iframe style='visibility: hidden; height: 0; width: 0; border: 0px'></iframe> </div> 

This DIV is contained in a cell in a table, which again is part of a larger design. There’s a lot of CSS as mentioned. Don’t know if this helps…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T19:23:51+00:00Added an answer on May 10, 2026 at 7:23 pm

    Found the cause myself…

    It turns out Silverlight has a display problem when the control is placed in a html table. Found information about this on the silverlight forum. It was about the beta 2, but I have upgraded to the release version, and it’s still a problem.

    Try this. Add a height and a width to the table containing the Silverlight control. You may also want to add a single character of white space inside the TD containing the control.

    Basically when the table was rendered it couldn’t ‘see’ the size of the contents so it either didn’t render at all or only rendered to the size of a single white-space character.

    — John Stockton

    My design is quite complex with nested tables, so I haven’t actually been able to make it work yet.

    UPDATE:

    The actual fix I ended up implementing was a small JavaScript that ‘refreshes’ the containing <DIV>. Here it is:

    <script type='text/javascript'>     function refreshSL()     {         var div = document.getElementById('silverlightControlHost');         div.style.display = 'block';     }     refreshSL(); </script> 

    I placed this in my HTML below the actual SL markup, and then it worked (I guess calling it on the page loaded event would be the proper thing to do.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sometimes Microsoft's exception messages are infuriatingly unhelpful. I have created a nice little MVC
Be nice, I'm a total newbie to F#. I have created my first console
I have a project which I created a few days ago as a test
Have created a c++ implementation of the Hough transform for detecting lines in images.
I have created a template for Visual Studio 2008 and it currently shows up
I have created a custom dialog for Visual Studio Setup Project using the steps
I have created a PHP-script to update a web server that is live inside
I have created a UserControl that has a ListView in it. The ListView is
I have created a C# class file by using a XSD-file as an input.
I have created a few small flash widgets that stream .mp3 audio from an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.