Example #1
0
 private async void LoadingDot_DotFinish(object sender, EventArgs e)
 {
     TempraturePathAnimation.Completed += (s, v) =>
     {
         RefreshCompleteAni.Begin();
     };
     TempraturePathAnimation.Begin();
     AQIAni.Begin();
     if (rootIsWideState)
     {
         DetailGrid0Play();
         DetailGrid1Play();
         DetailGrid2Play();
         DetailGrid3Play();
         DetailGrid4Play();
         DetailGrid6Play();
         DetailGrid7Play();
     }
     for (int i = 0; i < detailGridAnimation_FLAG.Length; i++)
     {
         detailGridAnimation_FLAG[i] = false;
     }
     CalcDetailGridPosition();
     loaded = true;
     ScrollableRoot.ViewChanged += ScrollableRoot_ViewChanged;
     if (Context.AlwaysShowBackground)
     {
         WeatherCanvas.ImmersiveIn(await Context.GetCurrentBackgroundAsync());
     }
     LoadingDot.Visibility = Visibility.Collapsed;
 }
Example #2
0
        private async void ImmersiveButton_Click(object sender, RoutedEventArgs e)
        {
            if (Context.EnableFullScreen)
            {
                ApplicationView.GetForCurrentView().TryEnterFullScreenMode();
                await Task.Delay(160);
            }
            isImmersiveMode          = true;
            MainCanvas.PointerMoved += MainCanvas_PointerMoved;
            ImmersiveWidthIn.From    = MainCanvas.ActualWidth;
            ImmersiveWidthIn.To      = Root.ActualWidth;
            ImmersiveHeightIn.From   = MainCanvas.ActualHeight;
            ImmersiveHeightIn.To     = Root.ActualHeight;
            UIHelper.ChangeTitlebarButtonColor(Colors.Transparent, Colors.White);
            Application.Current.Resuming += Current_Resuming;
            ImmersiveTransAni.Completed  += (s, args) =>
            {
                MainCanvas.Width  = double.NaN;
                MainCanvas.Height = double.NaN;
                if (Context.ImmersiveTimeout == 0)
                {
                    if (immersiveTimer != null)
                    {
                        immersiveTimer.Cancel();
                    }
                    return;
                }
                if (immersiveTimer != null)
                {
                    immersiveTimer.Cancel();
                }
                immersiveTimer = ThreadPoolTimer.CreateTimer(async(task) =>
                {
                    await GotoImmersiveAllin();
                }, TimeSpan.FromSeconds(Context.ImmersiveTimeout));
            };
            ImmersiveTransAni.Begin();
            if (fengcheTimer != null)
            {
                fengcheTimer.Cancel();
                detailGridAnimation_FLAG[1] = false;
            }
            await Task.Delay(1000);

            WeatherCanvas.ImmersiveIn(await Context.GetCurrentBackgroundAsync());
            //UserProfilePersonalizationSettings profileSettings = UserProfilePersonalizationSettings.Current;
            // Only support files stored in local folder
        }