Ejemplo n.º 1
0
        /// <summary>Changes the Window Background when Aero Glass is enabled or disabled.</summary>
        /// <param name="sender">The object that called the event.</param>
        /// <param name="e">The <c>CompositionChangedEventArgs</c> instance containing the event data.</param>
        void ChangeWindowChrome(object sender, CompositionChangedEventArgs e)
        {
            this.Background = e.IsGlassEnabled ? Brushes.Transparent : Brushes.White;

            if (!e.IsGlassEnabled)
            {
                return;
            }

            AeroGlass.EnableGlass(this, new Margins(0, 32, 0, 41));
        }
Ejemplo n.º 2
0
 /// <summary>Changes the Window Background when Aero Glass is enabled or disabled.</summary>
 /// <param name="sender">The object that called the event.</param>
 /// <param name="e">The <c>CompositionChangedEventArgs</c> instance containing the event data.</param>
 void ChangeWindowChrome(object sender, CompositionChangedEventArgs e)
 {
     if (e.IsGlassEnabled)
     {
         this.line.Visibility      = Visibility.Collapsed;
         this.rectangle.Visibility = Visibility.Collapsed;
         this.Background           = Brushes.Transparent;
         AeroGlass.EnableGlass(this, new Margins(0, 0, 0, 41));
     }
     else
     {
         this.line.Visibility      = Visibility.Visible;
         this.rectangle.Visibility = Visibility.Visible;
         this.Background           = Brushes.White;
     }
 }
Ejemplo n.º 3
0
        /// <summary>Enables Aero Glass on the Window.</summary>
        /// <param name="e">The <c>EventArgs</c> instance containing the event data.</param>
        protected override void OnSourceInitialized(EventArgs e)
        {
            base.OnSourceInitialized(e);
            AeroGlass.EnableGlass(this, new Margins(0, 0, 0, 41));

            if (AeroGlass.IsGlassEnabled)
            {
                this.line.Visibility      = Visibility.Collapsed;
                this.rectangle.Visibility = Visibility.Collapsed;
                this.Background           = Brushes.Transparent;
            }
            else
            {
                this.line.Visibility      = Visibility.Visible;
                this.rectangle.Visibility = Visibility.Visible;
                this.Background           = Brushes.White;
            }
        }
Ejemplo n.º 4
0
 /// <summary>Enables Aero Glass on the Window.</summary>
 /// <param name="e">The <c>EventArgs</c> instance containing the event data.</param>
 protected override void OnSourceInitialized(EventArgs e)
 {
     base.OnSourceInitialized(e);
     AeroGlass.EnableGlass(this, new Margins(0, 32, 0, 41));
     this.Background = AeroGlass.IsGlassEnabled ? Brushes.Transparent : Brushes.White;
 }