public bool toggleVisibility() { if (this.Visibility == System.Windows.Visibility.Visible) { FadeEffect fade = new FadeOutEffect(timing); fade.Start(this); // this.Visibility = System.Windows.Visibility.Hidden; return false; } else { FadeEffect fade = new FadeInEffect(timing); fade.Start(this); this.Activate(); // this.Visibility = System.Windows.Visibility.Visible; return true; } }
protected void closeSubWindow(System.Windows.Controls.Grid grid) { FadeEffect fade = new FadeOutEffect(timing); fade.Start(grid); ribbon.IsEnabled = true; GameGrid.IsEnabled = true; ArchiveGrid.IsEnabled = true; }