The library document displayed by the library view is specified by the Document property. In order to be functional the library view has to be connected to a library document:
C# |
Copy Code
|
// attach the view to a document
libraryView.Document = libraryDocument;
|
Visual Basic |
Copy Code
|
' attach the view to a document
libraryView.Document = libraryDocument
|
The library view content layer is populated with library view items. They are represented by instances of the NLibraryViewItem class. Each item represents a single master from the library document to which the view is attached. The purpose of the library view items is to provide visual representation of the masters inside a library.
Library view items can be reshaped, which means that the actual shape of the item can change. This is necessary, because library views support several types of view styles.
The style of the library view is controlled by the ViewStyle property. The values which this property can accept are enumerated by the LibraryViewStyle enumeration. The following code changes the view style to Thumbnails:
C# |
Copy Code
|
libraryView.ViewStyle = LibraryViewStyle.Thumbnails;
|
Visual Basic |
Copy Code
|
libraryView.ViewStyle = LibraryViewStyle.Thumbnails
|
The library view style controls the shape of the library view items.
All library view items are displayed with the same appearance, which is represented by an instance of the
NLibraryViewItemAppearance class, an instance of which can be obtained from the
ItemAppearance property of the library view.
Library view items share a common set of settings, which define different metrics related to position and size of the different parts from which they are constructed. They are all grouped in an instance of the
NLibraryViewItemLayout class, an instance of which can be obtained from the
ItemLayout property of the library view.