/// <summary> /// Gets the view model from the data Context and assigns it to a member variable. /// </summary> private void OnMainGridDataContextChanged(object sender, DependencyPropertyChangedEventArgs e) { m_ViewModel = (ReasonMainViewModel)this.DataContext; }
public ReasonMainView(ReasonMainViewModel viewModel) { InitializeComponent(); this.DataContext = viewModel; }