The MessageText property is only updated when I click on another control. Moreover, if I press any button, then this Click handler is not executed and the MessageText set is executed instead. I broke my head.
<TextBox x:Name="messageText" Grid.Row="1" Grid.Column="0" TextWrapping="Wrap" Text="{Binding Path=MessageText, Mode=TwoWay}"/>
private void ChatView_Loaded(object sender, RoutedEventArgs e) { DataContext = viewModel; }
public string MessageText { get { return this.messageText; } set { this.messageText = value; OnProperyChanged("MessageText"); } }
c # data-binding wpf xaml
OneMoreVladimir Aug 18 2018-12-18T00: 00Z
source share