Hello,
I have a custom control that hosts a RichTextBox/RtfDataProvider in WPF 4.5.
I'm using Telerik version 2015.3.1104.45.
Following is the XAML which works fine in the visual studio designer.
<
telerik:RtfDataProvider
x:Name
=
"RtfProvider"
Grid.Row
=
"1"
Rtf
=
"{Binding RtfFileContent, ElementName=RtfEditorUC, Mode=TwoWay}"
RichTextBox
=
"{Binding ElementName=radRTB}"
/> <
telerik:RadRichTextBox
x:Name
=
"radRTB"
Grid.Row
=
"1"
DocumentInheritsDefaultStyleSettings
=
"True"
IsSpellCheckingEnabled
=
"False"
LayoutMode
=
"Paged"
VerticalAlignment
=
"Top"
IsReadOnly
=
"{Binding IsRtfReadOnly, ElementName=RtfEditorUC, Mode=TwoWay}"
/>
However, at runtime, I have the following crash :
System.Reflection.TargetInvocationException: Une exception a été levée par la cible d'un appel. ---> System.Windows.Markup.XamlParseException: L'invocation du constructeur sur le type 'Telerik.Windows.Documents.FormatProviders.Rtf.RtfDataProvider' qui correspond aux contraintes de liaison spécifiées a levé une exception. ---> System.ArgumentNullException: La valeur ne peut pas être null.
Nom du paramètre : formatProvider
à Telerik.Windows.Documents.FormatProviders.DataProviderBase..ctor(ITextBasedDocumentFormatProvider formatProvider, DependencyProperty stringProperty)
à Telerik.Windows.Documents.FormatProviders.Rtf.RtfDataProvider..ctor()
à System.Xaml.Schema.XamlTypeInvoker.DefaultCtorXamlActivator.InvokeDelegate(Action`1 action, Object argument)
à System.Xaml.Schema.XamlTypeInvoker.DefaultCtorXamlActivator.CallCtorDelegate(XamlTypeInvoker type)
à System.Xaml.Schema.XamlTypeInvoker.CreateInstance(Object[] arguments)
à MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateInstanceWithCtor(XamlType xamlType, Object[] args)
à MS.Internal.Xaml.Runtime.ClrObjectRuntime.CreateInstance(XamlType xamlType, Object[] args)
The same code was working fine in WPF 3.5 with Telerik 2012.2.912.35.
Any help appreciated.