winrt-xaml-toolkit

How to get GridView.Selected Item's Scroll Position in Windows 8 Metro App

和自甴很熟 提交于 2019-12-06 11:24:44
问题 I am selecting gridview item using code, so I also need my gridview to Scrolls at selected item's position , I tried GridView.ScrollintoPosition() but it is not working . IS there any way to get the Scroll position of SelectedItem so that I can scroll it using scrollViewer1.ScrollToHorizontalOffsetWithAnimation() 回答1: There are a few aspects here. I think just gridView.ScrollIntoView(gridView.SelectedItem) should work. It's a bit asynchronous, so the code wouldn't immediately see it scrolled,

How to get GridView.Selected Item's Scroll Position in Windows 8 Metro App

感情迁移 提交于 2019-12-04 16:20:32
I am selecting gridview item using code, so I also need my gridview to Scrolls at selected item's position , I tried GridView.ScrollintoPosition() but it is not working . IS there any way to get the Scroll position of SelectedItem so that I can scroll it using scrollViewer1.ScrollToHorizontalOffsetWithAnimation() There are a few aspects here. I think just gridView.ScrollIntoView(gridView.SelectedItem) should work. It's a bit asynchronous, so the code wouldn't immediately see it scrolled, but if you do something like await Task.Delay(100) - you might be able to see the ScrollViewer offset

How to detect ListView is scrolling up or down

て烟熏妆下的殇ゞ 提交于 2019-11-28 10:20:34
Is there a way to detect that ScrollViwer of ListView is in scrolling mode and stopped scrolling. In windows phone 8.1 ListView we can not get reference of the scrollviewer. Any one done it in windows phone 8.1 WinRT app? yasen Once the ListView is Loaded you can get the ScrollViewer like this: var sv = (ScrollViewer)VisualTreeHelper.GetChild(VisualTreeHelper.GetChild(this.ListV, 0), 0); Edit As Romasz suggested, once you get the ScrollViewer , you can use its ViewChanged event, to monitor when it is scrolling and when it stops. Also, here's the generic extension method that I use for

How to detect ListView is scrolling up or down

流过昼夜 提交于 2019-11-27 03:38:21
问题 Is there a way to detect that ScrollViwer of ListView is in scrolling mode and stopped scrolling. In windows phone 8.1 ListView we can not get reference of the scrollviewer. Any one done it in windows phone 8.1 WinRT app? 回答1: Once the ListView is Loaded you can get the ScrollViewer like this: var sv = (ScrollViewer)VisualTreeHelper.GetChild(VisualTreeHelper.GetChild(this.ListV, 0), 0); Edit As Romasz suggested, once you get the ScrollViewer , you can use its ViewChanged event, to monitor