With Expression Blend it's quite easy to style your own custom ScrollBar to get the look you want.
In this example I wanted the corners to be rounded with some gradient. Looks great. Now let's see the horizontal version.
Looks just like the vertical version, just as we expected. Just to be sure everything is OK, let's see what it looks like with both.
This is definitely not what we expected!
When this first happened to me, I figured that I missed setting the transparency on some element within the ScrollBar style. After pulling much hair and performing some creative Internet searches (finding nothing on the subject), I came to the realization that I did not miss anything in the ScrollBar style. If this was true, where was this white box coming from? Although I did not explicitly declare a ScrollViewer, I suspected that one was getting created to house the scrollbars. I created a global ScrollViewer style and set the Grid background to Transparent.
<Style TargetType="{x:Type ScrollViewer}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ScrollViewer}"> <Grid x:Name="Grid" Background="Transparent"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="*"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> ................. </ControlTemplate> </Setter.Value> </Setter> </Style>
...And the white box disappeared.
Just as expected!
Remember Me
a@href@title, i, strike, u
Copyright © 2003-2008 Falafel Software Inc.
Subscribe to Falafel Blogs
The opinions expressed herein are Falafel's employees own personal opinions and do not represent Falafel Software's view in any way in case they go bananas!