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