Event argument for The CompositionChanged event.
Inheritance: System.EventArgs
        /// <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));
        }
 /// <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;
     }
 }
 /// <summary>Changes the UI depending on whether Aero Glass is enabled.</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 UpdateUI(object sender, CompositionChangedEventArgs e)
 {
     if (e.IsGlassEnabled)
     {
         this.tbTitle.Foreground = Brushes.Black;
         this.line.Visibility = Visibility.Collapsed;
         this.rectangle.Visibility = Visibility.Collapsed;
     }
     else
     {
         this.tbTitle.Foreground = new SolidColorBrush(Color.FromRgb(0, 51, 153));
         this.line.Visibility = Visibility.Visible;
         this.rectangle.Visibility = Visibility.Visible;
     }
 }
 /// <summary>Updates the UI based on whether Aero Glass is enabled.</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 UpdateUI(object sender, CompositionChangedEventArgs e)
 {
     this.tbTitle.Foreground = e.IsGlassEnabled ? Brushes.Black : new SolidColorBrush(Color.FromRgb(0, 51, 153));
 }
Exemple #5
0
 /// <summary>Changes the UI depending on whether Aero Glass is enabled.</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 UpdateUI(object sender, CompositionChangedEventArgs e)
 {
     if (AeroGlass.IsGlassEnabled)
     {
         this.tbAbout.Foreground = Brushes.Black;
         Grid.SetRow(this.rectSide, 1);
         Grid.SetRowSpan(this.rectSide, 5);
         this.spBackButton.Visibility = Visibility.Visible;
     }
     else
     {
         this.tbAbout.Foreground = Brushes.White;
         Grid.SetRow(this.rectSide, 0);
         Grid.SetRowSpan(this.rectSide, 7);
         this.spBackButton.Visibility = Visibility.Collapsed;
     }
 }
Exemple #6
0
 /// <summary>Updates the UI based on whether Aero Glass is enabled.</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 UpdateUI(object sender, CompositionChangedEventArgs e)
 {
     if (e.IsGlassEnabled)
     {
         this.tbTitle.Foreground = Brushes.Black;
         this.tbHelp.Foreground = Brushes.Black;
         this.tbAbout.Foreground = Brushes.Black;
     }
     else
     {
         this.tbTitle.Foreground = new SolidColorBrush(Color.FromRgb(0, 51, 153));
         this.tbHelp.Foreground = new SolidColorBrush(Color.FromRgb(0, 102, 204));
         this.tbAbout.Foreground = new SolidColorBrush(Color.FromRgb(0, 102, 204));
     }
 }