Пример #1
0
 private void Grid_Loaded(object sender, RoutedEventArgs e)
 {
     if (VisibleWidth > FormatNumber && IsDivideScreen)
     {
         MetroFrame.Navigate(typeof(MetroPage));
     }
     if (toastUri != null)
     {
         var decode = JsonHelper.FromJson <ToastParameters>(toastUri);
         if (decode != null)
         {
             NavigateToBase?.Invoke(
                 null,
                 new NavigateParameter {
                 ToUri           = new Uri(decode.Uri),
                 Title           = decode.Title,
                 IsFromInfoClick = true,
                 IsNative        = true,
                 FrameType       = FrameType.Content
             },
                 GetFrameInstance(FrameType.Content),
                 GetPageType(NavigateType.ItemClickNative));
         }
     }
 }
Пример #2
0
 private void Grid_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     ImagePopup.Width  = (sender as Grid).ActualWidth;
     ImagePopup.Height = (sender as Grid).ActualHeight;
     if (UserInfosFrame.Content == null && UpContentFrame.Content == null && ContentFrame.Content == null && MetroFrame.Content == null)
     {
         if (VisibleWidth > FormatNumber && IsDivideScreen)
         {
             MetroFrame.Navigate(typeof(MetroPage));
         }
     }
 }
Пример #3
0
 private void OnBackRequested(object sender, BackRequestedEventArgs e)
 {
     if (UserInfosFrame.Content != null)
     {
         OutFramePage(UserInfosFrame);
     }
     else
     {
         if (UpContentFrame.Content != null)
         {
             OutFramePage(UpContentFrame);
         }
         else
         {
             if (ContentFrame.Content != null)
             {
                 OutFramePage(ContentFrame);
             }
             else
             {
                 if (MetroFrame.Content != null)
                 {
                     if (!isNeedClose)
                     {
                         InitCloseAppTask();
                     }
                     else
                     {
                         Application.Current.Exit();
                     }
                 }
                 else
                 {
                     MetroFrame.Navigate(typeof(MetroPage));
                 }
             }
         }
     }
     e.Handled = true;
 }