Inheritance: System.Windows.Controls.UserControl
Ejemplo n.º 1
0
        public ControlRepository(VSTalkCore core)
        {
            _chatFrame = new CommonChatFrame
            {
                    DataContext = new ChatFrameViewModel(core)
            };

            _contactList = new MainControl
            {
                    DataContext = new MainViewModel(core)
            };
        }
Ejemplo n.º 2
0
 public UserControl Create()
 {
     if (_context == null)
     {
         _context = new ChatFrameViewModel();
         _context.StartListen();
     }
     if (_control == null)
     {
         _control = new CommonChatFrame();
     }
     if (_control.DataContext == _context)
     {
         return _control;
     }
     _control.DataContext = _context;
     return _control;
 }