private void BtnCreate_OnClick(object sender, RoutedEventArgs e) { var editWindow = new WinProfileEdit(); if (editWindow.ShowDialog() ?? false) { App.Profiles.LoadProfiles(); } }
private void BtnEdit_OnClick(object sender, RoutedEventArgs e) { var profile = (sender as Button)?.DataContext as BoundProfile; var editWindow = new WinProfileEdit { BoundProfile = profile }; editWindow.ShowDialog(); }