How To Customize The DocumentViewer
The following tutorial demonstrates how to customize the various settings of the DocumentViewer.
1) Create a document viewer as is explained in the tutorial
How To Use The DocumentViewer
2) Run the application, select the screen that contains the document viewer and select a document from disk. Your applications should look like this;
By default the document viewer renders a number of buttons that are used to zoom a document in and out.
3) Select the Design Screen
button in the top-right corner of the application window to open the LightSwitch screen designer.
4) Select the Document
data item that is visually represented by the DocumentViewer.
5) The Properties pane reveals a number of DocumentViewer specific properties. The properties define how the DocumentViewer is rendered and what functionality is available. You can for example enable document printing which will display a print button in the
command bar of the DocumentViewer.
Set the Label Position
and check the Enable thumbnails
checkbox. The changes are immediately reflected in the screen designer.
6) Click Save to apply the changes and return to the application. Your application should look similar to the screenshot.
The DocumentViewer contains a set of properties that define the behavior of the control. The properties can be changed on runtime in the screen designer or in the Visual Studio designer.
: learn how to store documents in a database in
How To Create And Use A Table of Documents