Table of Contents

Class GlassWindow

Namespace
Microsoft.WindowsAPICodePack.Shell
Assembly
Microsoft.WindowsAPICodePack.Shell.dll

WPF Glass Window Inherit from this window class to enable glass on a WPF window

public class GlassWindow : Window
Inheritance
GlassWindow

Constructors

GlassWindow()

public GlassWindow()

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

bool

Methods

ExcludeElementFromAeroGlass(FrameworkElement)

Excludes a UI element from the AeroGlass frame.

public void ExcludeElementFromAeroGlass(FrameworkElement element)

Parameters

element FrameworkElement

The element to exclude.

Remarks

Many non-WPF rendered controls (i.e., the ExplorerBrowser control) will not render properly on top of an AeroGlass frame.

OnSourceInitialized(EventArgs)

OnSourceInitialized Override SourceInitialized to initialize windowHandle for this window. A valid windowHandle is available only after the sourceInitialized is completed

protected override void OnSourceInitialized(EventArgs e)

Parameters

e EventArgs

EventArgs

ResetAeroGlass()

Resets the AeroGlass exclusion area.

public void ResetAeroGlass()

SetAeroGlassTransparency()

Makes the background of current window transparent from both Wpf and Windows Perspective

public void SetAeroGlassTransparency()

Events

AeroGlassCompositionChanged

Fires when the availability of Glass effect changes.

public event EventHandler<AeroGlassCompositionChangedEventArgs> AeroGlassCompositionChanged

Event Type

EventHandler<AeroGlassCompositionChangedEventArgs>