This is a migrated thread and some comments may be shown as answers.

Bind TxtFormatProvider?

3 Answers 143 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Kirk Quinbar
Top achievements
Rank 1
Kirk Quinbar asked on 08 Sep 2010, 02:07 PM
I've seen examples of how to bind in xaml the richtextbox to the htmlformatprovider and the xamlformatprovider, but is it possible to bind to the txtformatprovider? I cannot find any example of this so i am hoping you can provide one?

3 Answers, 1 is accepted

Sort by
0
Boby
Telerik team
answered on 14 Sep 2010, 08:30 AM
Hello Kirk Quinbar,
Thank you for bringing this up. Unfortunately, there is a bug in Q2 SP1 version that breaks binding.
This is will be fixed in the next LIB.
After getting the new version, the approach will be the same as with the other data providers:
<UserControl x:Class="SilverlightApplication1.MainPage"
    mc:Ignorable="d"
    xmlns:documentTxt="clr-namespace:Telerik.Windows.Documents.FormatProviders.Txt;assembly=Telerik.Windows.Documents">
    <UserControl.Resources>
        <documentTxt:TxtDataProvider x:Key="txtDataProvider"
            RichTextBox="{Binding ElementName=radRichTextBox1}"
            Text="{Binding ElementName=textBox1, Path=Text, Mode=TwoWay}"/>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <telerik:RadRichTextBox Grid.Row="1" Name="radRichTextBox1" />
        <TextBox Name="textBox1" />
    </Grid>
</UserControl>

Until then you can use the TxtFormatProvider in the code behind to load/save text document and handle the RadRichTextBox.DocumentContentChanged event to persist changes back. We are sorry for the inconvenience. The points in your account have been updated. Don't hesitate to contact us if you have other questions.


Greetings,
Boby
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Kirk Quinbar
Top achievements
Rank 1
answered on 14 Sep 2010, 03:09 PM
lol i probably just missed a description elsewhere but what does LIB mean? I keep hearing that used and assume it just means the next interim release, but didnt know official name.

when is the next release or how often are they?
0
Ivailo Karamanolev
Telerik team
answered on 15 Sep 2010, 09:41 AM
Hi Kirk Quinbar,

LIB is an acronym for Latest Internal Build - these are builds that we produce usually every Friday (at least for RadControls for Silverlight). They contain the latest usable features and are suitable for cutting-edge development, but still not stable enough for production. They should be available in Telerik account downloads.
Feel free to get back to us if you have any other questions.

Kind regards,
Ivailo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
RichTextBox
Asked by
Kirk Quinbar
Top achievements
Rank 1
Answers by
Boby
Telerik team
Kirk Quinbar
Top achievements
Rank 1
Ivailo Karamanolev
Telerik team
Share this question
or