How to

get handle of WPF window

Published: 23. November 2011 | Updated: 23. November 2011
License: Microsoft Public License (MS-PL)
Categories: WPF
Tags: C# Windows WPF
Was this snippet helpful for you? YESYES / NONO

Import namespace

using System.Windows.Interop;

Code

Window window = new Window();

IntPtr handle = new WindowInteropHelper(window).Handle;
Send us feedback about this snippet »



Related Snippets: