private void MenuItem_File_Preferences_Click(object sender, RoutedEventArgs e)
        {
            PreferencesWindow preferences = new PreferencesWindow();

            preferences.Owner = this;
            preferences.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            preferences.ShowDialog();
        }
 private void MenuItem_File_Preferences_Click(object sender, RoutedEventArgs e)
 {
     PreferencesWindow preferences = new PreferencesWindow();
     preferences.Owner = this;
     preferences.WindowStartupLocation = WindowStartupLocation.CenterOwner;
     preferences.ShowDialog();
 }