Customizing the Scroller With Styles
The Scroller control can be skinned using the standard Silverlight 2 method of setting Styles in the App.xaml file of your Silverlight project.
You need to login to Download the default Menu styles, If you do not have a login you can register for free!
Example of how to Apply a Skin to the Scroller
These styles are placed in your XAML and referred to using the Style property:
<Style TargetType="local:Scroller">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="local:Scroller">
<Grid x:Name="RootElement">
<Canvas x:Name="ElementCanvas" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Canvas.Clip>
<RectangleGeometry x:Name="ElementClipping" />
</Canvas.Clip>
<ContentPresenter x:Name="ElementContent" Canvas.Left="{TemplateBinding HorizontalOffset}" Canvas.Top="{TemplateBinding VerticalOffset}" />
</Canvas>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
As you can see, styling is a powerful method of customizing the controls to suite the look and feel of your Silverlight application.
Rate this page:
1 Star
2 Star
3 Star
4 Star
5 Star
8 Ratings / 2.5 Average