Export (0) Print
Expand All

Visio Web Access Web Part in Visio Services Samples

SharePoint 2010

Last modified: December 03, 2013

Applies to: SharePoint Server 2010

In this article
Annotations Sample
Custom Error Messages Sample
Mouse Interaction Sample

Note Note

The information in this topic applies to SharePoint 2013 as well as to SharePoint 2010. The samples provided in the SharePoint 2010 SDK also work in SharePoint 2013, but are not included in the SharePoint 2013 SDK.

The SharePoint 2010 SDK download file (SharePoint 2010 Reference: Software Development Kit) provides three sample JavaScript files that show best practices for programming the Visio Web Access Web Part, and that you can use on your own Web Parts pages:

Each sample has a corresponding topic in the SDK that explains how to use the sample, and the code in each sample file includes extensive explanatory comments. To download the SharePoint 2010 SDK, including these samples, see SharePoint 2010 Reference: Software Development Kit. After you install the SDK, you can find the samples in a compressed (.zip) file in the following path: C:\Program Files (x86)\Microsoft SDKs\SharePoint 2010\Samples\Visio Services.

The Annotations sample shows how to annotate a Web drawing page in two ways: by using shape overlays and by using shape highlights. In a Content Editor Web Part, the sample code adds four list controls that enable users to choose drawing parameters for the annotations. It also adds a button that enables users to submit their choices and draw the annotation.

The Custom Error Messages sample shows how to use the Visio Web Access Web Part to display or hide custom HTML error messages. It creates a user interface for the code sample that consists of two text boxes that are used to capture the error message title and body, and two buttons to show or hide the error message.

The Mouse Interaction sample shows how to declare event handlers for the various Visio Web Access mouse-related events, and how to handle these events when they occur. It displays notifications of mouse actions that occur in a Content Editor Web Part, such as entering a shape, leaving a shape, or changing the selected shape.

Show:
© 2014 Microsoft