void Form1_AeroGlassCompositionChanged( object sender, AeroGlassCompositionChangedEventArgs e )
 {
     // When the desktop composition mode changes the window exclusion must be changed appropriately.
     if( e.GlassAvailable )
     {
         compositionEnabled.Checked = true;
         ExcludeControlFromAeroGlass( panel1 );
         Invalidate( );
     }
     else
     {
         compositionEnabled.Checked = false;
         this.BackColor = Color.Teal;
     }
 }
 void Window1_AeroGlassCompositionChanged( object sender, AeroGlassCompositionChangedEventArgs e )
 {
     // When the desktop composition mode changes the background color  and window exclusion must be changed appropriately.
     if( e.GlassAvailable )
     {
         this.EnableCompositionCheck.IsChecked = true;
         SetAeroGlassTransparency( );
         ExcludeElementFromAeroGlass( eb1 );
         InvalidateVisual( );
     }
     else
     {
         this.EnableCompositionCheck.IsChecked = false;
         this.Background = System.Windows.Media.Brushes.Teal;
     }
 }