Beispiel #1
0
        public void Setup(IContentChanger contentChanger)
        {
            var topData = Data.Peek();
            var content = Activator.CreateInstance(topData.ControlType) as UserControl;

            contentChanger.ChangeContent(content);

            topData.Setup(content?.DataContext);
        }
Beispiel #2
0
        private void OnContextChanged(IContentChanger dataContextChanger)
        {
            if (CurrentContentChanger != null)
            {
                CurrentContentChanger.ContentChange -= DataContextChanger_DataContextChange;
            }

            CurrentContentChanger = dataContextChanger;
            if (CurrentContentChanger != null)
            {
                CurrentContentChanger.ContentChange += DataContextChanger_DataContextChange;
            }
        }
 public SecondViewModel(IContentChanger contentChanger)
 {
     _contentChanger = contentChanger;
 }
Beispiel #4
0
 public FirstViewModel(IContentChanger contentChanger)
 {
     _contentChanger = contentChanger;
 }