Nevron .NET Vision
Diagram for .NET / User's Guide / WinForm Components / Library Views

In This Topic
    Library Views
    In This Topic

    Library views are represented by the NLibraryView class (derived from NView). Library views are designed to provide a visual representation of the masters contained in a library document. Library views are controls, which appear in the Visual Studio toolbox. They are represented by the following item:


     Document

    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
    
     Library View Items

    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.

     View Style

    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.
     Items Appearance
    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.
     Items Layout
    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.
     Related Examples
    Windows Forms: Visual Interface Components - Library Browser
    See Also