Finally we found solutions for most of the problems related to RadRichTextBox/RadBook scenario:
The approach involves several new controls.
is used to bind RadBook (or in fact any other Items-Control). It wraps the provided document and raises collection-changed events when content of the document changes and as a result page count changes.
is able to display (and partially edit) a single page of a document. This is the control that is added to RadBook page templates. Actually the most heavy lifting is done by RadDocumentSinglePagePresenter
that lays inside RadDocumentSinglePageEditor.
To identify which page to present, this control requites a PageIndex, which in the case is provided by the items of RadDocumentBindingSource
. It also needs a reference to a DocumentViewManager.
is a control that aggregates some common data used by all instances of RadDocumentSinglePageEditor
that are added to each RadBook page, like the RadDocument instance being presented.
Currently there are still issues in the editing scenario and this is the reason editing is not enabled by default (RadDocumentSinglePageEditor.IsReadonly
). Most of these issues should be resolved in the service pack. However editing in this case actually does not provide a good user experience (by design) and this is why our primary goal is to achieve good document viewing experience.
Please consider this demo as a "preview" of this functionality and do not pay great attention to the issues that might come up. Feedback is greatly appreciated though. With the next version (SP1) we will integrate this new classes in Telerik.Windows.Documents assembly. Please note that the names of the classes as well as some of their API may change. Currently this demo should be built using Q2 version of RadControls for Silverlight 4.
I really hope this solution will be useful in many scenarios involving no so standard presentation of documents. I am anxious to know what do you think about this.
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?
Telerik Public Issue Tracking
system and vote to affect the priority of the items