Click here to Skip to main content
Click here to Skip to main content

Tagged as

Silverlight Smooth Scrolling

, 29 Oct 2012
Rate this:
Please Sign up or sign in to vote.
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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

vvss12300
Software Developer (Senior)
India India
No Biography provided

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web03 | 2.8.140827.1 | Last Updated 29 Oct 2012
Article Copyright 2012 by vvss12300
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid