private void OnHandleCreated( object sender, EventArgs e ) { // Window is now created, assign handle to NativeWindow. var control = sender as Control; if ( control != null ) { Initialize( control ); } }