Example #1
0
 private void Window_Closed(object sender, EventArgs e)
 {
     if (appearanceDialog != null)
     {
         appearanceDialog.Close();
         appearanceDialog = null;
     }
 }
Example #2
0
 private void Toggle_appearance_Click(object sender, RoutedEventArgs e)
 {
     if (appearanceDialog != null && appearanceDialog.IsVisible)
     {
         appearanceDialog.Close();
         appearanceDialog = null;
     }
     else
     {
         appearanceDialog = new AppearanceDialog(this.DataContext)
         {
             Topmost = true
         };
         appearanceDialog.Show();
     }
 }