public MainPageViewModel()
 {
     Messages = new ObservableCollection<Message>();
     Message = new ChatUdpAnySourceMulticastClient.Message() { Type = MessageType.Self };
     SendCommand = new DelegateCommand(OnSendCommandExecuted);
     ConnectCommand = new DelegateCommand(OnConnectCommandExecuted);
 }
 void OnSendCommandExecuted()
 {
     client.SendAsync(UserName, Message.Text,
                      () => Message = new ChatUdpAnySourceMulticastClient.Message()
     {
         Type = MessageType.Self
     });
 }
 public MainPageViewModel()
 {
     Messages = new ObservableCollection <Message>();
     Message  = new ChatUdpAnySourceMulticastClient.Message()
     {
         Type = MessageType.Self
     };
     SendCommand    = new DelegateCommand(OnSendCommandExecuted);
     ConnectCommand = new DelegateCommand(OnConnectCommandExecuted);
 }
 void OnSendCommandExecuted()
 {
     client.SendAsync(UserName, Message.Text,
         () => Message = new ChatUdpAnySourceMulticastClient.Message() { Type = MessageType.Self });
 }