I'm developing metro app using Windows 8 release preview and C#(VS 2012), Is there any way to scroll grid view horizontal scroll bar by providing HorizantalOffset.
Brief: In scroll-viewer class we can move horizontal scroll bar and vertical scroll bar dynamically using ScrollToHorizontalOffset
and ScrollToVerticalOffset
,But in gridview I don't find those properties, So how can I scroll dynamically by code? or can i get reference to scrollbar in gridview ? Can any one help me with this, Thanks in advance
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
You can get the reference to the ScrollViewer from the GridView's template using VisualTreeHelper. You can also use some helper methods I put in WinRT XAML Toolkit - in VisualTreeHelperExtensions. You would just need to add
then call
and there you go.
EDIT* - note the namespace has changed in later versions of the toolkit to WinRTXamlToolkit.Controls.Extensions.