ChangesDocument Toolkit Help

Document Toolkit 2 is not backwards compatible with v1.x. This article describes the changes that have been made.

This topic contains the following sections:

Document Object Model changes

FixedDocument instances are no longer directly accessible on a XpsDocument instance. The new FixedDocumentSequence class groups the fixed documents and provides additional document metadata.

Loading Documents

Although the Document IO API with its XpsClient and IPackageReader is mostly unchanged, it is highly recommended to start using the new DocumentDataSource control for loading documents. The data source hides the low-level access required to asynchrously load document contents.

Document Viewer

The DocumentViewer replaces the FixedDocumentViewer of Document Toolkit v1. The FixedDocumentViewer encapsulates the entire document loading, viewing, annotation and text selection. In Document Toolkit 2 this functionality has been split into various controls. Document page loading is now performed by the new DocumentDataSource control. Taking the loading functionality out of the viewer enables the re-use of page loading by other controls such as the DocumentPrinter and ThumbnailListBox. Page virtualizing is now encapsulated in the PageVirtualizer behavior.

The FixedDocumentViewer was used to view a single FixedDocument instance at a time, where the DocumentViewer uses a single XpsDocument instance. Multiple FixedDocuments available in a single XpsDocument can now be viewed at once.

The document viewer UI is further simplified by removing the PagesControl and PageItem controls. These controls have been replaced by the Silverlight ItemsControl.

Controller Toolbar

The v1 ControllerToolbar control has been removed. The ControllerToolbar was used to provide page navigation, view mode selection, text search, and more. The various elements of the ControllerToolbar are now available as seperate controls. The PageNavigator control provides page navigation, the ViewModePicker enables the end-user to select a view mode. The HistoryNavigator provides UI elements for navigating the document navigation history. Text search commands are available on the DocumentDataSource control.

Text Selection Toolbar

The TextSelectionToolbar control has been removed. The Silverlight 4 right mouse click and Silverlight Toolkit context menu are used to replace this control.

Font API

All font related objects have moved to the FirstFloor.Documents.Fonts namespace.

Licensing

The licensing mechanism has changed in Document Toolkit 2. In v1.x you would receive the unlocked assemblies on purchase of the product. In Document Toolkit 2 a license file is used to unlock the evaluation version. The evaluation version is fully functional and renders a watermark on each page. With a valid license file in place, the watermark is removed.

For more details on licensing, see Licensing.

Tree View Model

The tree view model, which provided a structured display of document metadata, has been removed from the core Document Toolkit API. The source code of the view model is now available in the Document Toolkit Extension open source project.

Full Text Search

Full Text Search classes have been renamed and a new ISearchProvider interface has been added to enable custom text searches.

Document Toolkit Extensions

Document Toolkit samples and extension projects are no longer part of Document Toolkit. The Document Toolkit Extensions open source project has been created on Codeplex. The open source project allows updates and fixes to the extension project outside the main release cycle of Document Toolkit.

See Also

Other Resources