The Libraries module allows users to easily create and manage libraries of documents and images. The Libraries module provides the several public controls which manage libraries. This topic provides information of how to use
the LibraryManager class.
A library is a container for files with specific extensions, generally called images and documents. Almost all LibraryManager methods provide
functionality to manage libraries. Images and Documents, on the other hand, have the functionality of a content item and that is why the Libraries module is based on Generic
Content. Most methods needed to manage the files are actually methods of the ContentManager class.
Unlike other modules based on the Generic Content module, the Images and Documents module has a manager class that does not use a Content property to
access content items' methods. Instead, the methods used to manage content items are accessed directly from the LibraryManager class because it inherits the
ContentManager class.
How to Start Using the LibraryManager Class
You can create a new instance of the LibraryManager class anywhere in your code in order to work with Libraries module data. If working in
an assembly, make sure you reference the Telerik.Libraries assembly before you use the LibraryManager class.
In order to start using Images and Documentes module API, create a new instance of the LibraryManager class:
Create a new instance of LibraryManager with specified provider name:
|
Copy Code |
|
// creates new instance of LibraryManager class with provider name as parameter,
// which means that LibraryManager will use specified provider when working with data Telerik.Libraries.LibraryManager
libraryManager = new Telerik.Libraries.LibraryManager("MyCustomProvider");
|
Working with Public Controls
The important files to inherit when working with public controls are: LibraryViewBase, Gallery, and DownloadList.
The available selector classes are: GallerySelector and LibrarySelector.
The designers for the public controls of the Images and Documents module are: FileListDesigner, GalleryDesigner and
LibraryDesigner.
Content
Following are the topics that explain how to work with different methods of LibraryManager:
Libraries:
Files:
See Also