private void LoadGfxEngine() { Dispatcher.BeginInvoke(DispatcherPriority.Normal, (ThreadStart) delegate() { lock (myEngineRenderPanel) { myEngineRenderPanel.Anchor = (System.Windows.Forms.AnchorStyles.None); myEngineBridge = new EngineBridge(); myEngineBridge.Init(myHwndToPanel, 1280, 720); } }); }