Example:
Xaml:
And also works after the following correction:
Xaml:
Xaml:
<extToolkit:RichTextBox IsReadOnly="True" Text="{Binding MyText, Mode=OneWay}">
<extToolkit:RichTextBox.TextFormatter>
<extToolkit:PlainTextFormatter />
</extToolkit:RichTextBox.TextFormatter>
</extToolkit:RichTextBox>
ViewModel:public string MyText { get; private set; }
this.MyTextChangeCommand = new RelayCommand(() =>
this.MyText = "new value";
this.RaisePropertyChanged(nameof(this.MyText));
}});
But the same code perfectly works if replace RichTextBox to TextBox.And also works after the following correction:
Xaml:
<extToolkit:RichTextBox IsReadOnly="True" Text="{Binding MyText}">
<extToolkit:RichTextBox.TextFormatter>
<extToolkit:PlainTextFormatter />
</extToolkit:RichTextBox.TextFormatter>
</extToolkit:RichTextBox>
ViewModel:public string MyText { get; set; }
MyTextChangeCommand - the same