private void GameMainWindow_Loaded(object sender, RoutedEventArgs e) { // After everything has loaded, rendered and so on Dispatcher.BeginInvoke(DispatcherPriority.ContextIdle, new Action(() => { //System.Windows.Forms.MessageBox.Show("dispatched"); MainGFX.Start(); GameStarting(); })); }
private void Window_Loaded(object sender, RoutedEventArgs e) { // After everything has loaded, rendered and so on Dispatcher.BeginInvoke(DispatcherPriority.ContextIdle, new Action(() => { lstSprites.ItemsSource = ThisLevel.Sprites; Scroller = new GameScroller(GameSlider, MainGFX, GameWrapper); MainGFX.Start(); })); }