Introduced
Re-imagine the ScrollViewer of Windows 8 Store Apps
Chaining-chains
Rail-Track
Inertia-inertia
Snap-Snap To
Zoom-Zoom
Example
1, demonstrating the chaining characteristics of ScrollViewer
Scrollviewer/chaining.xaml
<page x:class= "XamlDemo.Controls.ScrollViewer.Chaining" xmlns= "http://schemas.microsoft.com/winfx/2006/xaml/p Resentation "xmlns:x=" Http://schemas.microsoft.com/winfx/2006/xaml "xmlns:local=" using: XamlDemo.Controls.ScrollViewer "xmlns:d=" http://schemas.microsoft.com/expression/blend/2008 "xmlns:mc=" http:// schemas.openxmlformats.org/markup-compatibility/2006 "mc:ignorable=" D "> <grid background=" Transparent "&
Gt
<stackpanel margin= "0 0 0" > <ScrollViewer> <StackPanel>
<textblock text= "I am the Reference" fontsize= "14.667"/> <!-- Chaining: chains, in touch mode, scrolling this scrollviewer if the bounds are exceeded, scroll the test method for the parent ScrollViewer This example: In touch mode, scroll ScrollViewer The content inside until the boundary is beyond the bounds, do not stop to continue scrolling, through "I am the reference" to see if the parent ScrollViewer is also scrolled ishorizontals Crollchainingenabled-whether to enable chaining on the horizontal direction, the defaultTrue isverticalscrollchainingenabled-enable chaining in vertical direction with true default value
;
<scrollviewer name= "ScrollViewer" width= "height=" margin= "0 0 0" horizontalalignment= "left" Horizontalscrollmode= "Enabled" verticalscrollmode= "Enabled" Horizontalscrollbarvisibi Lity= "Visible" verticalscrollbarvisibility= "Visible" ishorizontalscrollchainingenabled= "{Binding ischecked, elementname=chkishorizontalscrollchainingenabled} "isverticalscrollchainingenabled=" {Binding ischecked, elementname=chkisverticalscrollchainingenabled} "> <image source="/assets /logo.png "width=" 1000 "/> </ScrollViewer> <stackpanel orientatio n= "Horizontal" > <checkbox name= "chkishorizontalscrollchainingenabled" Content= "ishorizontalscrollchainingenabled" ischecked= "True" margin= "0 0 0"/> <checkbox Name= "chkisverticalscrollchainingenabled" content= "isverticalscrollchainingenabled" IsChecked= "True" Margin= "10 0 0 0 "/> </StackPanel> </StackPanel> </scrollviewer>
; </StackPanel> </Grid> </Page>