Пример #1
0
 private void MainVM_OnCategoryChanged()
 {
     if (Window.Current.Bounds.Width >= 720)
     {
         HamburgerBtn.ForegroundBrush = MainVM.CateColor;
         TitleTB.Foreground           = MainVM.CateColor;
         ProgressRing.Foreground      = MainVM.CateColor;
         TitleBarHelper.SetUpTitleBarColorForDarkText();
     }
     else
     {
         var solidColor = HeaderContentRootGrid.Background as SolidColorBrush;
         if (solidColor == null)
         {
             return;
         }
         if (solidColor.Color != MainVM.CateColor.Color)
         {
             ChangeColorAnim.To   = MainVM.CateColor.Color;
             ChangeColorAnim.From = Colors.White;
             ChangeColorStory.Begin();
         }
         HamburgerBtn.ForegroundBrush = new SolidColorBrush(Colors.White);
         TitleTB.Foreground           = new SolidColorBrush(Colors.White);
         ProgressRing.Foreground      = new SolidColorBrush(Colors.White);
         TitleBarHelper.SetUpTitleBarColorForLightText();
     }
 }
Пример #2
0
 private void UpdateColorWhenSizeChanged()
 {
     if (Window.Current.Bounds.Width >= WIDTH_THRESHOLD)
     {
         if (!_isToggleAnim1)
         {
             ChangeColorAnim.To   = Colors.White;
             ChangeColorAnim.From = (HeaderContentRootGrid.Background as SolidColorBrush).Color;
             ChangeColorStory.Begin();
             _isToggleAnim1 = true;
             _isToggleAnim2 = false;
             ToggleDrawerAnimation(true);
         }
         HamburgerBtn.ForegroundBrush = MainVM.CateColor;
         TitleTB.Foreground           = MainVM.CateColor;
         ProgressRing.Foreground      = MainVM.CateColor;
         TitleBarHelper.SetUpTitleBarColorForDarkText();
     }
     else
     {
         if (!_isToggleAnim2)
         {
             ChangeColorAnim.To   = MainVM.CateColor.Color;
             ChangeColorAnim.From = Colors.White;
             ChangeColorStory.Begin();
             _isToggleAnim2 = true;
             _isToggleAnim1 = false;
             ToggleDrawerAnimation(false);
         }
         HamburgerBtn.ForegroundBrush = new SolidColorBrush(Colors.White);
         TitleTB.Foreground           = new SolidColorBrush(Colors.White);
         ProgressRing.Foreground      = new SolidColorBrush(Colors.White);
         TitleBarHelper.SetUpTitleBarColorForLightText();
     }
 }
 public virtual void OnShow()
 {
     OnShownChanged?.Invoke(this, new ShownArgs()
     {
         Shown = true
     });
     _titleBarControl = TitleBarHelper.CustomTitleBar(this.Content);
     _titleBarControl.OnClickBackBtn += (x, e) =>
     {
         Shown = false;
     };
     //Window.Current.SetTitleBar(this);
     if (DeviceHelper.IsMobile)
     {
         StatusBarHelper.SetUpBlackStatusBar();
     }
     else
     {
         TitleBarHelper.SetUpTitleBarColorForDarkText();
     }
 }
Пример #4
0
 protected virtual void SetUpTitleBar()
 {
     TitleBarHelper.SetUpTitleBarColorForDarkText();
 }
Пример #5
0
 protected override void SetUpTitleBar()
 {
     TitleBarHelper.SetUpTitleBarColorForDarkText();
 }