Esempio n. 1
0
        private void RelativePanel_LayoutUpdated(object sender, object e)
        {
            var v = ScrollableRoot.VerticalOffset;

            if (v < 536)
            {
                if (v > 2 && !isFadeOut)
                {
                    isFadeOut = true;
                    TempratureOut.Begin();
                }
                else if (v < 2 && isFadeOut)
                {
                    isFadeOut = false;
                    TempratureIn.Begin();
                }
            }
        }
Esempio n. 2
0
 private void ImmersiveBackButton_Click(object sender, RoutedEventArgs e)
 {
     MainCanvas.PointerMoved -= MainCanvas_PointerMoved;
     if (immersiveTimer != null)
     {
         immersiveTimer.Cancel();
         immersiveTimer = null;
     }
     Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Arrow, 1);
     ImmersiveHeightBack.From    = MainCanvas.ActualHeight;
     ImmersiveWidthBack.From     = MainCanvas.ActualWidth;
     ImmersiveHeightBack.To      = ScrollViewerConverter.WeatherCanvasHeight - ScrollableRoot.VerticalOffset < 160 ? 160 : ScrollViewerConverter.WeatherCanvasHeight - ScrollableRoot.VerticalOffset;
     ImmersiveWidthBack.To       = rootIsWideState ? Root.ActualWidth / 2 : Root.ActualWidth;
     App.Current.Resuming       -= Current_Resuming;
     ImmersiveBackAni.Completed += (s, args) =>
     {
         if (isFadeOut)
         {
             TempratureOut.Begin();
         }
         Binding HeightBinding = new Binding();
         HeightBinding.Source    = ScrollableRoot;
         HeightBinding.Path      = new PropertyPath("VerticalOffset");
         HeightBinding.Converter = new ScrollViewerConverter();
         BindingOperations.SetBinding(MainCanvas, HeightProperty, HeightBinding);
         MainCanvas.Width = double.NaN;
         DetailGrid1Play();
     };
     ImmersiveBackAni.Completed += (s, v) =>
     {
         ApplicationView.GetForCurrentView().ExitFullScreenMode();
     };
     ImmersiveBackAni.Begin();
     isImmersiveMode = false;
     WeatherCanvas.ImmersiveOut(!Context.AlwaysShowBackground);
 }