AJ's blog

August 15, 2010

A Pesky Little Silverlight Problem: The Presumptuous Scrollbar

Filed under: Silverlight — ajdotnet @ 1:54 pm

Just a small issue, but it may drive you crazy if you have to hunt it down… (it did that with me.)

I have my Silverlight application sitting on an .aspx page, occupying all real estate. I work a while. And suddenly there is this scrollbar appearing on the right side:


To hunt it down, I create a new Silverlight project. No scrollbar. I compare the .aspx‘’. No difference to speak of. I deconstruct the Silverlight part of my application in hope the scrollbar will disappear. It won’t.


Finally I stumbled by accident over the reason (which is – in retrospect – quite obvious):

Here’s the .aspx fragment that creates the Silverlight plugin:


Created by VS, I changed some code above this frament, and reformatted it in VS for better readability. And you know what? It’s already broken!

And I broke it by… drum-roll please… reformatting it in VS! The issue is the (irrelevant, according to any standard I’m aware of) whitespaces between the tags. Manually changing the code back to the original (closing object tag and iframe element at the end)…


… will solve the problem and the scrollbar is gone:


Just one more reason to prefer Silverlight over HTML, if you ask me!

That’s all for now folks,

kick it on DotNetKicks.com


1 Comment »

  1. Thank you very much.. It solved my problem!

    Comment by HB — September 2, 2011 @ 11:59 am

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: