Page view counter
Bug: ScrollBar HorizontalRootElement shows as artifact behind VerticalRootElement
Last post 06-22-2008 7:20 PM by KeithRome. 3 replies.
Sort Posts:
03-28-2008 2:11 PM
Bug: ScrollBar HorizontalRootElement shows as artifact behind VerticalRootElement

Steps to reproduce the problem:

1) Populate a ListBox control with enough content so that both vertical and horizontal scroll bars appear.

2) Copy the default ListBox, ScrollBar, and related templates to App.xaml and wire them up as appropriate

3) Comment out the Track Layer in the VerticalRootElement so that you can see behind the scroll bar

4) An artifact of the HorizontalRootElement (from the HorizontalThumbTemplate) is clearly visible (narrow the vertical bar if you have trouble seeing it)

A very annoying bug, it took many hours to track it down.

 

jseaver

Loading...
Joined on 03-14-2008
Posts 13
03-31-2008 6:53 AM
Marked as Answer
Re: Bug: ScrollBar HorizontalRootElement shows as artifact behind VerticalRootElement

Hello, this is a known issue. The ScollBar's code missed this line:

ElementVerticalTemplate = GetTemplateChild(ElementVerticalTemplateName) as FrameworkElement;

It'll probably be fixed soon. For now, you can download the source code of the Controls from http://www.microsoft.com/downloads/details.aspx?familyid=EA93DD89-3AF2-4ACB-9CF4-BFE01B3F02D4&displaylang=en and do the modification yourself.

shanaolanxing - I'll transfer to the Windows Azure team, and will have limited time to participate in the Silverlight forum. Apologize if I don't answer your questions in time.

Yi-Lun Luo - MSFT

Loading...
Joined on 10-29-2007
Posts 2,688
06-21-2008 3:04 PM
Re: Bug: ScrollBar HorizontalRootElement shows as artifact behind VerticalRootElement

this bug is still present in beta 2.Sad (see my blog entry here for more details)

Mark Heath
http://mark-dot-net.blogspot.com/

markheath

Loading...
Joined on 07-11-2002
Southampton, England
Posts 59
06-22-2008 7:20 PM
Re: Bug: ScrollBar HorizontalRootElement shows as artifact behind VerticalRootElement

I can confirm this bug is still present in beta2 as well. But since the ScrollBar control was relocated to the core Silverlight assembly (as opposed to the external controls assembly), we can't "hand patch" it ourselves.

So I guess it's back to my old work-around of having seperate Horizontal and Vertical versions of the ScrollBar templates in my custom styles... oh well, at least I get some help from Blend now when editing the templates...

Keith Rome
Project Manager & Senior Consultant
MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS, MVP (C#)
Wintellect | krome@wintellect.com
www.wintellect.com
Weblog: http://www.mindfusioncorp.com/weblog/

KeithRome

Loading...
Joined on 07-04-2007
Atlanta, GA
Posts 47
Microsoft Communities