public SingleRadioEditorWindow(ViewModels.RadioSignalItemModel radioSignal) { if (radioSignal == null) { throw new ArgumentNullException(); } InitializeComponent(); ViewModels.SingleRadioEditorViewModel vm = new ViewModels.SingleRadioEditorViewModel(radioSignal); this.DataContext = vm; }
private void dtEditRadio_Click(object sender, RoutedEventArgs e) { FrameworkElement fe = sender as FrameworkElement; if (fe == null || fe.Tag == null) { return; } ViewModels.RadioSignalItemModel radioModel = fe.Tag as ViewModels.RadioSignalItemModel; if (radioModel == null) { return; } Windows.SingleRadioEditorWindow editor = new Windows.SingleRadioEditorWindow(radioModel); editor.ShowDialog(); }