Exemplo n.º 1
0
 private void UpdateIcons()
 {
     if (BorderWindow != null && rootView != null)
     {
         if (BorderWindow.IsMaximized() == true)
         {
             if (maximalizeIcon != null)
             {
                 maximalizeIcon.ResourceUrl = DarkPreviousIcon;
             }
             if (minimalizeIcon != null)
             {
                 minimalizeIcon.ResourceUrl = DarkMinimalizeIcon;
             }
             if (closeIcon != null)
             {
                 closeIcon.ResourceUrl = DarkCloseIcon;
             }
             if (leftCornerIcon != null)
             {
                 leftCornerIcon.ResourceUrl = DarkLeftCornerIcon;
             }
             if (rightCornerIcon != null)
             {
                 rightCornerIcon.ResourceUrl = DarkRightCornerIcon;
             }
             rootView.CornerRadius       = new Vector4(0, 0, 0, 0);
             rootView.CornerRadiusPolicy = VisualTransformPolicyType.Relative;
             BorderWindow.SetTransparency(false);
         }
         else
         {
             if (maximalizeIcon != null)
             {
                 maximalizeIcon.ResourceUrl = MaximalizeIcon;
             }
             if (minimalizeIcon != null)
             {
                 minimalizeIcon.ResourceUrl = MinimalizeIcon;
             }
             if (closeIcon != null)
             {
                 closeIcon.ResourceUrl = CloseIcon;
             }
             if (leftCornerIcon != null)
             {
                 leftCornerIcon.ResourceUrl = LeftCornerIcon;
             }
             if (rightCornerIcon != null)
             {
                 rightCornerIcon.ResourceUrl = RightCornerIcon;
             }
             rootView.CornerRadius       = new Vector4(0.03f, 0.03f, 0.03f, 0.03f);
             rootView.CornerRadiusPolicy = VisualTransformPolicyType.Relative;
             BorderWindow.SetTransparency(true);
         }
     }
 }