Пример #1
0
 /// <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;
 }
Пример #2
0
        public LocationMainView(LocationMainViewViewModel viewModel)
        {
            InitializeComponent();

            this.DataContext = viewModel;
        }