Visio Web Access Web Part in Visio Services Samples
Published: May 2010
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.