Hello!
I am trying to load a .rtf document in the RadRichTextBox using bindings in XAML.
Here is my XAML:
What type should be the object that is bound to the "Rtf" property of RtfDataProvider? Can I pass an array of bytes? Can I do it without any code-behind? I can see in the output that my code always throws an exception : "A first chance exception of type 'System.NullReferenceException' occurred in Telerik.Windows.Documents.dll". Thank you in advance.
Sincerely yours,
Mike.
I am trying to load a .rtf document in the RadRichTextBox using bindings in XAML.
Here is my XAML:
<
UserControl.DataContext
>
<
DutyRegulations:DutyRegulationsViewModel
/>
</
UserControl.DataContext
>
<
UserControl.Resources
>
<
DataTemplate
x:Key
=
"TabContentTemplate"
>
<
Grid
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"*"
/>
</
Grid.ColumnDefinitions
>
<
telerik:RadRichTextBox
x:Name
=
"radRichTextBox"
IsReadOnly
=
"True"
Grid.Column
=
"0"
Width
=
"500"
Height
=
"500"
/>
<
Rtf:RtfDataProvider
Rtf
=
"{Binding FileSource}"
RichTextBox
=
"{Binding ElementName=radRichTextBox}"
/>
</
Grid
>
</
DataTemplate
>
</
UserControl.Resources
>
<
Grid
>
<
telerik:RadTabControl
HorizontalAlignment
=
"Stretch"
Name
=
"radTabControl"
VerticalAlignment
=
"Stretch"
ItemsSource
=
"{Binding Path=StaffDutyRegulations}"
DisplayMemberPath
=
"Staff.Name"
ContentTemplate
=
"{StaticResource TabContentTemplate}"
/>
</
Grid
>
Sincerely yours,
Mike.