public GroupChatViewModel() { MessageCollectionViewModel = new MessageCollectionViewModel(); SendCommand = new RelayCommand(SendCommandExecute, () => !IsLoading); SendAttachmentCommand = new RelayCommand(SendAttachmentCommandExecute, () => !IsLoading); ShowGroupInfoCommand = new RelayCommand(ShowGroupInfoCommandExecute, () => !IsLoading); ShowImageCommand = new RelayCommand<ImageSource>(ShowImageCommandExecute, img => !IsLoading); }
public PrivateChatViewModel() { MessageCollectionViewModel = new MessageCollectionViewModel(); SendCommand = new RelayCommand(SendCommandExecute, () => !IsLoading && IsMessageSendingAllowed); AcceptRequestCommand = new RelayCommand(AcceptRequestCommandExecute, () => !IsLoading); RejectRequestCommand = new RelayCommand(RejectCRequestCommandExecute, () => !IsLoading); ShowUserInfoCommand = new RelayCommand(ShowUserInfoCommandExecute, () => !IsLoading); typingIndicatorTimer.Interval = typingIndicatorTimeout; typingIndicatorTimer.Tick += (sender, o) => IsOtherUserTyping = false; pausedTypingTimer.Interval = pausedTypingTimeout; pausedTypingTimer.Tick += PausedTypingTimerOnTick; }