/// <summary> /// Instantiate and show new tracker widnow (as dialog). /// </summary> private void NewTracker(object sender, RoutedEventArgs e) { var newTrackerWindow = new TrackerEditWindow() { Owner = this }; newTrackerWindow.ShowDialog(); }
/// <summary> /// Edit tracker button handler. Opens edit tracker dialog. /// </summary> private void EditTracker(object sender, RoutedEventArgs e) { var trackerID = ((sender as FrameworkElement)?.DataContext as Tracker).ID; var editTrackerWindow = new TrackerEditWindow(trackerID) { Owner = this }; editTrackerWindow.ShowDialog(); }