/// <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 = (CountryMainViewViewModel)this.DataContext; }
public CountryMainView(CountryMainViewViewModel viewModel) { InitializeComponent(); this.DataContext = viewModel; }