packages/Windows API Code Pack 1.1/source/WindowsAPICodePack/Shell/DesktopWindowManager/GlassWindow.cs
/// <summary>
/// OnSourceInitialized
/// Override SourceInitialized to initialize windowHandle for this window.
/// A valid windowHandle is available only after the sourceInitialized is completed
/// </summary>
/// <param name="e">EventArgs</param>
OnSourceInitialized
Override SourceInitialized to initialize windowHandle for this window.
A valid windowHandle is available only after the sourceInitialized is completed
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)
        {
            base.OnSourceInitialized(e);
            WindowInteropHelper interopHelper = new WindowInteropHelper(this);
            this.windowHandle = interopHelper.Handle;
            HwndSource source = HwndSource.FromHwnd(windowHandle);
            source.AddHook(new HwndSourceHook(WndProc));
            ResetAeroGlass();
        }
protected override void OnSourceInitialized ( EventArgs e ) { base . OnSourceInitialized ( e ) ; WindowInteropHelper interopHelper = new WindowInteropHelper ( this ) ; this . windowHandle = interopHelper . Handle ; HwndSource source = HwndSource . FromHwnd ( windowHandle ) ; source . AddHook ( new HwndSourceHook ( WndProc ) ) ; ResetAeroGlass ( ) ; }
OnSourceInitialized
Override SourceInitialized to initialize windowHandle for this window.
OnSourceInitialized Override SourceInitialized to initialize windowHandle for this window .
// add Window Proc hook to capture DWM messages
e
EventArgs
None