public ControlRepository(VSTalkCore core) { _chatFrame = new CommonChatFrame { DataContext = new ChatFrameViewModel(core) }; _contactList = new MainControl { DataContext = new MainViewModel(core) }; }
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; }