Skip to main content

Microsoft Silverlight

Answered Question Bug: ScrollBar HorizontalRootElement shows as artifact behind VerticalRootElementRSS Feed

(1)

jseaver
jseaver

Member

Member

14 points

14 Posts

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.

 

Yi-Lun Luo - MSFT
Yi-Lun L...

All-Star

All-Star

25052 points

2,747 Posts

Answered Question

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.

markheath
markheath

Member

Member

117 points

63 Posts

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)

KeithRome
KeithRome

Member

Member

112 points

47 Posts

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/
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities