다음을 통해 공유


DiagramView Class

Definition

This is the view control that creates design surface and scrollbars.

public ref class DiagramView : System::Windows::Forms::Control
public class DiagramView : System.Windows.Forms.Control
type DiagramView = class
    inherit Control
Public Class DiagramView
Inherits Control
Inheritance
DiagramView
Derived

Constructors

DiagramView()

The default constructor creates and initializes all of the controls in the DiagramView. And, signs up for events from the scrollbars and DiagramClientView.

Properties

ActiveMouseAction

Gets or sets the active mouse action for this DiagramView.

Diagram

Gets or sets the Diagram object associated with this DiagramView.

DiagramClientView

Returns the client view design surface contained within the DiagramView.

GripColor

The color to use to paint the gripper in the lower-right corner of the diagram when both vertical and horizontal scrollbars are visible.

HasWatermark

Set this property to true to enable watermark on design surface or to false to disable it (false is default).

Selection

Gets the selection for the DiagramView.

Site

Sets the site for the diagram view. This property is a passthrough to the associated DiagramClientView's site.

Toolbox

Provide cached access to the toolbox. The diagram must be displayed by a diagram view that has access to the toolbox through it's Site property.

Watermark

Returns LinkLabel which represents the watermark control on design surface. Use this property after HasWatermark is set to true to specify watermark text, link areas and link event handler.

ZoomFactor

Gets the scaling factor.

Methods

CreateAccessibilityInstance()
NudgeDown()

Moves the selection down.

NudgeLeft()

Moves the selection left.

NudgeRight()

Moves the selection right.

NudgeUp()

Moves the selection up.

OnHandleDestroyed(EventArgs)

Catch the handle destroy event to allow an orderly shutdown of the diagram if this is the final handle.

OnSizeChanged(EventArgs)

Handles the SizeChanged event by repositioning and resizing all of child control

OnWatermarkCreated()

Called after the watermark for this view has been created. Override this method to provide custom behavior, like adding particular links to the Watermark (it derives from the WinForms LinkLabel control).

ScrollDown()

Scrolls the view down.

ScrollLeft()

Scrolls the view left.

ScrollRight()

Scrolls the view right.

ScrollUp()

Scrolls the view up.

SelectedToolboxItemSupportsFilterString(String)

Determines whether the currently selected toolbox item supports the given filter string. Useful for recognizing custom filters.

WndProc(Message)

Override the default WndProc so that we don't shutdown VS and launch Watson unless it's a critical exception. If it's not, then we just diplay the error message.

ZoomAtViewCenter(Single)

Zooms in or out around the center point of the current view.

ZoomIn()

Zooms in

ZoomOut()

Zooms out

ZoomToFit()

Zooms in or out to show the entire diagram as large as possible.

Applies to