Beispiel #1
0
        private void EnterFullScreen(Grid youtuGrid, FullScreenEventArgs e)
        {
            Window.Current.CoreWindow.KeyDown        -= CoreWindow_KeyDown;
            Window.Current.CoreWindow.PointerPressed -= ArticlePage_PointerPressed;

            var app     = Application.Current.Resources["ApplicationProperty"] as ApplicationProperty;
            var setting = Application.Current.Resources["SettingProperty"] as SettingProperty;

            var scrollviewer = GetScrollViewer(ArticleListView);

            if (scrollviewer != null)
            {
                VerticalScrollOffset = scrollviewer.VerticalOffset;
            }

            app.FullScreen = true;
            youtuGrid.Children.Remove(e.WebView);
            VideoGrid.Children.Add(e.WebView);
        }
Beispiel #2
0
        private void ExitFullScreen(Grid youtuGrid, FullScreenEventArgs e)
        {
            var app     = Application.Current.Resources["ApplicationProperty"] as ApplicationProperty;
            var setting = Application.Current.Resources["SettingProperty"] as SettingProperty;

            VideoGrid.Children.Remove(e.WebView);
            youtuGrid.Children.Add(e.WebView);

            app.FullScreen = setting.FullScreen;

            if (GetScrollViewer(ArticleListView) is ScrollViewer scrollviewer)
            {
                var act = Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => {
                    scrollviewer.UpdateLayout();
                    scrollviewer.ChangeView(0, VerticalScrollOffset, null, true);
                });
            }

            Window.Current.CoreWindow.KeyDown        += CoreWindow_KeyDown;
            Window.Current.CoreWindow.PointerPressed += ArticlePage_PointerPressed;
        }