Solved

Vertical scroll bar not displayed.  Cuts off silverlight app to the height of web browser.

Posted on 2008-06-25
3
5,537 Views
Last Modified: 2013-11-12
I have a 800 x 825 pixel silverlight app that I'm displaying from within a html web page.  Everything looks fine when I view the app from the web browser of my desktop PC where I have a big monitor, however when I view it from the web browser on my laptop the application is cut off vertically as the window of my laptop web browser is only about 800 pixels tall.  What I would have expected is that I would have had a vertical scroll bar on the side of the browser.  You can actually view the page in question at www.silverlightwebapps.com.

Below is a snippet from the page.  I tried adding "overflow: scroll" to the style section to see if that would make the scroll bars appear but it didn't.

    <style type="text/css">
    html, body {
          height: 1000px;
          overflow: scroll;
    }
    body {
          padding: 0;
          margin: 0;
    }
    #silverlightControlHost {
          height: 1000px;
          width:800px;
          overflow:scroll;
          
    }
    </style>

...later within the body section I have the silverlight object tag
<div id="silverlightControlHost">
<object data="data:application/x-silverlight," type="application/x-silverlight-2-b2" width="100%" height="1000px">

0
Comment
Question by:mdobbles
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Expert Comment

by:kkretsch
ID: 21873566
Just to be shure it isn't a silverlight problem:
Did you try to use an image of the same dimension instead of the whole object tag?
If that doesn't scroll like you would like it is a simple css/html problem. In that case I would reduce all the redundant height attributes but leave the height on the image tag. SO it should scroll by itself.
0
 
LVL 8

Expert Comment

by:adler77
ID: 21889584
The Silverlight animation is way off the top and left for me, but I do have two separate scrollbars. Try setting the dimensions only in the silverlightControlHost div (set it exactly to the dimensions of the app, 800x825. For the Silverlight params, use 100% for height and width.
0
 

Accepted Solution

by:
mdobbles earned 0 total points
ID: 21926137
It turns out the problem was that whenever you build an application in ExpressionBlend the default.html file is overwritten by ExpressionBlend, so all the things I changed actually we're not really changed.  The key was to create a new web project in Visual Studio 2008 and include the ExpressionBlend project as a subproject of the VS2008 web project.  That way you can manage both the website part of the project and the Silverlight part.  I'm going to put a tutorial on this topic at my website SilverlightWebApps.com here shortly.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question