When running my application it fails:
Exception: Object reference not set to an instance of an object.
Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter
ClearPresenterUI
Source: Telerik.Windows.Documents
Target: Void ClearPresenterUI()
Stacktrace: at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.ClearPresenterUI()
at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.DoOnDocumentChanging()
at Telerik.Windows.Controls.RadRichTextBox.set_Document(RadDocument value)
at Telerik.Windows.Documents.FormatProviders.DataProviderBase.UpdateDocument()
at Telerik.Windows.Documents.FormatProviders.DataProviderBase.StringPropertyChangedCallback(DependencyObject sender, DependencyPropertyChangedEventArgs e)
....
5 Answers, 1 is accepted
But every time I try to open a ModelView with the RadTextBox the applications asks for...
Telerik.Windows.Documents, Version=2012.1.326.40
'Telerik.Windows.Controls.RichTextBoxUI.StylesGallery' that matches the specified binding constraints threw an exception.'
It is OK when I remove
<telerik:StylesGallery AssociatedRichTextBox="{Binding Path=AssociatedRichTextBox, Mode=OneWay}" /> The ListStylesGallery gives an error as well.
I tried both version 2012.2.607.40 and 2012.2.716.40
Judging from the exception, it seems that not all assemblies have been successfully substituted with the newer version of the controls. Please, clean the solution and verify that all assembly references point to the newer version of the controls. Sometimes a manual delete of the bin and obj folders in Visual Studio is needed in order to complete this step.
If the previous version you have used has been an older one than 2011 Q3 (2011 3 1116), it is possible that the wizard has failed to add the new references because we have changed the required assemblies for RadRichTextBoxRibbonUI. This has been done in order to use the new functionality of RadRibbonView instead of the old control - RadRibbonBar. You can refer to this article for a list of the assemblies you should reference in your project.
If you do not manage to resolve the issue, please open a support ticket and attach your project, so that we can assist you further.
Iva Toteva
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
Does your wpf-demo-examples work without the RadRichTextBoxRibbonUI.dll?
Can we do without the RadRichTextBoxRibbonUI.dll when using version 2012.2.716.40?
RadRichTextBoxRibbonUI is the ribbon control which is wired with the commands of the editor in most examples. It is not necessary to use it, you can use the editor without any UI or implement your own toolbar/context menu/etc.
However, judging from your post about the StylesGallery, you seem to be using the UI that comes with RadRichTextBox out of the box. In this case, you must add the assembly references to the dlls that contain the functionality.
The assembly that keeps the implementation of RadRichTextBoxRibbonUI, the styles and lists gallery, etc. is:
Telerik.Windows.Controls.RichTextBoxUI.dll
This assembly has a dependency on the assemblies listed below, which also have to be referenced in your project:
- Telerik.Windows.Controls.dll;
- Telerik.Windows.Controls.Input.dll;
- Telerik.Windows.Controls.Navigation.dll;
- Telerik.Windows.Controls.RibbonView.dll;
- Telerik.Windows.Data.dll;
- Telerik.Windows.Documents.dll.
You should make sure that these references are added to your project and that they are of the same version.
The error from your post that "Telerik.Windows.Documents, Version=2012.1.326.40" cannot be loaded means that one of the assemblies that have a dependency on Telerik.Windows.Documents is Version=2012.1.326.40. This could be the RichTextBoxUI or one of the other assemblies that the RichTextBoxUI depends on.
On a side note, I tested the 2011.2 716 version of the controls, as well as 2012.2 725 (the Q2 SP1 release) and everything worked as expected. Please, verify that the assembly references are correct and open a support ticket with your project, so that we could assist you further if needed.
Iva Toteva
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.