Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Silverlight Smooth Scrolling

0.00/5 (No votes)
29 Oct 2012 1  
Making Scrolling smooth in Silverlight Itempresenter

Introduction

By default, Silverlight Scrollviewer skips the entire item when it comes to scrolling.But we can make it scroll smooth.In various situations, depending upon the User Experience of our Silverlight application, we want to make a smooth move between the items.

Gallery

Using the Code

Microsoft Expression blend sdk has something for you. 

Microsoft.Expression.Interactivity has a FluidMoveBehavior can be easily used inside the listbox control template to achieve the target.

 <ScrollViewer x:Name="ScrollViewer" BorderBrush="Transparent" BorderThickness="0" 
      Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" 
      TabNavigation="{TemplateBinding TabNavigation}" 
      Style="{StaticResource ListBoxScrollViewerStyle}">
                <ItemsPresenter>
                                    <i:Interaction.Behaviors>
                                        <ei:FluidMoveBehavior x:Name="FluidMoveBehavior"/>
                                    </i:Interaction.Behaviors>
                </ItemsPresenter>
  </ScrollViewer>

To do this we need to add two assemblies Microsoft.Expression.Interactions.dll and System.Windows.Interactivity.dll

To learn more about FluidMoveBehavior visit :

http://msdn.microsoft.com/en-us/library/ff723946(v=expression.40).aspx

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here