Hi,
I have RadRichTextBox on my WPF Window. I am using MVVM design pattern and have binding in my View for this RadRichTextBox using TxtDataProvider as below:
<Window.DataContext>
<local:vmRichTextBox />
</Window.DataContext>
<Grid>
<telerik:RadRichTextBox x:Name="rchTextBox" Width="210" Height="150">
</telerik:RadRichTextBox>
<telerik:TxtDataProvider RichTextBox="{Binding ElementName= rchTextBox}" Text="{Binding Path= MessageToSend, Mode= TwoWay, UpdateSourceTrigger= PropertyChanged}"></telerik:TxtDataProvider>
</Grid>
Here Binding works perfect. Now, I would like the user to enter 120 characters only in above RadRichTextBox in a manner that whenever user enters 121st character the foregoround color of this character and exceeding characters changes to Red while typing itself. The first 120 characters will have default foreground color.
Please let me know how to implement this functionality with this RadRichTextBox in MVVM asap.
Thanks
I have RadRichTextBox on my WPF Window. I am using MVVM design pattern and have binding in my View for this RadRichTextBox using TxtDataProvider as below:
<Window.DataContext>
<local:vmRichTextBox />
</Window.DataContext>
<Grid>
<telerik:RadRichTextBox x:Name="rchTextBox" Width="210" Height="150">
</telerik:RadRichTextBox>
<telerik:TxtDataProvider RichTextBox="{Binding ElementName= rchTextBox}" Text="{Binding Path= MessageToSend, Mode= TwoWay, UpdateSourceTrigger= PropertyChanged}"></telerik:TxtDataProvider>
</Grid>
Here Binding works perfect. Now, I would like the user to enter 120 characters only in above RadRichTextBox in a manner that whenever user enters 121st character the foregoround color of this character and exceeding characters changes to Red while typing itself. The first 120 characters will have default foreground color.
Please let me know how to implement this functionality with this RadRichTextBox in MVVM asap.
Thanks