private void ScrollingHost_ViewChanged(object sender, ScrollViewerViewChangedEventArgs args) { var scrollViewer = sender as ScrollViewer; if (_scrollingHostDisabled) { if (!args.IsIntermediate) { scrollViewer.ChangeView(null, scrollViewer.ScrollableHeight, null, true); } _scrollingHost = scrollViewer.VerticalOffset; return; } if (scrollViewer.VerticalOffset >= scrollViewer.ScrollableHeight - 12 && _scrollingHost < scrollViewer.VerticalOffset) { _scrollingHostDisabled = true; SetScrollMode(false); SharedMedia.SetScrollMode(true); _sharedMediaDisabled = false; } _scrollingHost = scrollViewer.VerticalOffset; }
private void SharedMedia_ViewChanged(object sender, ScrollViewerViewChangedEventArgs args) { var scrollViewer2 = sender as ScrollViewer; if (_sharedMediaDisabled) { if (!args.IsIntermediate) { scrollViewer2.ChangeView(null, 12, null, false); } _sharedMedia = scrollViewer2.VerticalOffset; return; } if (scrollViewer2.VerticalOffset <= 12 && _sharedMedia > scrollViewer2.VerticalOffset) { SetScrollMode(true); _scrollingHostDisabled = false; _sharedMediaDisabled = true; SharedMedia.SetScrollMode(false); } _sharedMedia = scrollViewer2.VerticalOffset; }
private void SharedMedia_ViewChanged(object sender, ScrollViewerViewChangedEventArgs args) { var scrollViewer2 = SharedMedia.GetScrollViewer(); if (_sharedMediaDisabled) { if (!args.IsIntermediate) { scrollViewer2.ChangeView(null, 12, null, false); } _sharedMedia = scrollViewer2.VerticalOffset; return; } if (scrollViewer2.VerticalOffset <= 12 && _sharedMedia > scrollViewer2.VerticalOffset) { ScrollingHost.VerticalScrollMode = ScrollMode.Auto; ScrollingHost.VerticalScrollBarVisibility = ScrollBarVisibility.Auto; ScrollingHost.ChangeView(null, ScrollingHost.ScrollableHeight - 48, null, false); _scrollingHostDisabled = false; _sharedMediaDisabled = true; SharedMedia.SetScrollMode(false); } _sharedMedia = scrollViewer2.VerticalOffset; }
public void OnBackRequested(HandledRoutedEventArgs args) { if (_scrollingHostDisabled) { _scrollingHostDisabled = false; SharedMedia.SetScrollMode(false); //SetScrollMode(true); ScrollingHost.VerticalScrollMode = ScrollMode.Auto; ScrollingHost.VerticalScrollBarVisibility = ScrollBarVisibility.Auto; ScrollingHost.ChangeView(null, 0, null, false); ScrollingInfo.Visibility = Visibility.Visible; InfoPanel.Visibility = Visibility.Collapsed; args.Handled = true; } }