Esempio n. 1
0
 private void OnDataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
 {
     _viewmodel = e.NewValue as ChatViewVm;
     if (_viewmodel != null)
     {
         _viewmodel.OnMessagesChanged += OnMessagesChanged;
     }
 }
Esempio n. 2
0
        public MainWindowVm()
        {
            _chatService = new ChatService();
            _chatService.ConnectedChanged += OnConnectedChanged;


            _chatView  = new ChatViewVm(_chatService);
            _loginView = new LoginViewVm(_chatService);

            CurrentView = _loginView;
        }