public ClientViewModel()
 {
     var channelFactory = new DuplexChannelFactory<IChattingService>(new ClientService(), "ChattingServiceEndPoint");
     _server = channelFactory.CreateChannel();
     _this = this;
     CreateCommands();
     NavigationCommands();
 }
 public MainWindow()
 {
     InitializeComponent();
     DataContext = new ClientViewModel();
     _this = this;
 }