private void TemplatingView_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e) { m_ViewModel = e.NewValue as TemplatingViewModel; //if (m_ViewModel != null) //{ // // ViewModel has just been set as context to a view // m_ViewModel.NotifyAllPropertiesChanged(); //} }
public void Setup() { m_DispatcherHelper = A.Fake <IDispatcherHelper>(); m_ViewModel = new TemplatingViewModel(m_DispatcherHelper); m_IViewModel = (ITemplatingViewModel)m_ViewModel; m_Monitor = new EventMonitor(); m_Monitor.AddMonitoredObject(m_ViewModel); }