private static void RunGraphHostWindow(object Graph) { var window = new GraphHostWindow(); window.Graph = (INetworkGraph)Graph; window.Show(); //These next two lines from http://stackoverflow.com/questions/4183622/the-calling-thread-must-be-sta-because-many-ui-components-require-this-in-wpf window.Closed += (s, e) => System.Windows.Threading.Dispatcher.ExitAllFrames(); System.Windows.Threading.Dispatcher.Run(); }
private static void RunGraphHostWindow(object Graph) { var window = new GraphHostWindow(); window.Graph = (INetworkGraph)Graph; window.Show(); //These next two lines from http://stackoverflow.com/questions/4183622/the-calling-thread-must-be-sta-because-many-ui-components-require-this-in-wpf window.Closed += (s, e) => System.Windows.Threading.Dispatcher.ExitAllFrames(); System.Windows.Threading.Dispatcher.Run(); }