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; } }
private void setInterfaceEnabledness(bool status) { BlurEffect blur; disabled = !status; CancelButton.IsEnabled = !status; ribbon.IsEnabled = status; GameGrid.IsEnabled = status; ArchiveGrid.IsEnabled = status; System.Windows.Visibility a; FadeEffect fade; if (status) { // this is when enabled fade = new FadeOutEffect(timing); a = System.Windows.Visibility.Collapsed; // b = System.Windows.Visibility.Visible; blur = null; } else { fade = new FadeInEffect(timing); // this is when disabled a = System.Windows.Visibility.Visible; // b = System.Windows.Visibility.Collapsed; blur = new BlurEffect(); blur.Radius = 10; } fade.Start(DisablerGrid); notifier.Animated = !status; notifier.MenuEnabled = status; //progress.Effect = blur; //ribbon.Effect = blur; //subGrid.Effect = blur; CancelButton.Visibility = a; // DisablerGrid.Visibility = a; }
protected void openSubWindow(System.Windows.Controls.Grid grid) { ribbon.IsEnabled = false; GameGrid.IsEnabled = false; ArchiveGrid.IsEnabled = false; FadeEffect fade = new FadeInEffect(timing); fade.Start(grid); }