Class GlassForm
- Namespace
- Microsoft.WindowsAPICodePack.Shell
- Assembly
- Microsoft.WindowsAPICodePack.Shell.dll
Windows Glass Form Inherit from this form to be able to enable glass on Windows Form
public class GlassForm : Form
- Inheritance
-
GlassForm
Constructors
GlassForm()
public GlassForm()
Properties
AeroGlassCompositionEnabled
Get determines if AeroGlass is enabled on the desktop. Set enables/disables AreoGlass on the desktop.
public static bool AeroGlassCompositionEnabled { get; set; }
Property Value
Methods
ExcludeControlFromAeroGlass(Control)
Excludes a Control from the AeroGlass frame.
public void ExcludeControlFromAeroGlass(Control control)
Parameters
control
ControlThe control to exclude.
Remarks
Many non-WPF rendered controls (i.e., the ExplorerBrowser control) will not render properly on top of an AeroGlass frame.
OnLoad(EventArgs)
Catches the DWM messages to this window and fires the appropriate event.
protected override void OnLoad(EventArgs e)
Parameters
e
EventArgsThe arguments for this event
OnPaint(PaintEventArgs)
Overide OnPaint to paint the background as black.
protected override void OnPaint(PaintEventArgs e)
Parameters
e
PaintEventArgsPaintEventArgs
ResetAeroGlass()
Resets the AeroGlass exclusion area.
public void ResetAeroGlass()
SetAeroGlassTransparency()
Makes the background of current window transparent
public void SetAeroGlassTransparency()
WndProc(ref Message)
protected override void WndProc(ref Message m)
Parameters
m
Message
Events
AeroGlassCompositionChanged
Fires when the availability of Glass effect changes.
public event EventHandler<AeroGlassCompositionChangedEventArgs> AeroGlassCompositionChanged