NShape Reference
Display Class

<< Click to Display Table of Contents >>

Navigation:  Class Reference > Namespace Dataweb.NShape.WinFormsUI >

NShape Reference
Display Class

Previous pageReturn to chapter overviewNext page

A WinForms control for displaying diagrams.

Syntax

public class Display : UserControl, IDiagramPresenterIDisplayService

Description

A WinForms control for displaying diagrams.

Public Properties

Name

Description

ActiveLayers

Returns the active layers as bitwise combination of LayerIds flags.

ActiveTool

Provides access to the currently active tool.

BackColor

Specifies the background color of the component.

BackColorGradient

Specifies the gradient color of the component's background.

BackgroundGradientAngle

Specifies the angle of the background's color gradient.

ConnectionPointShape

Specifies the shape of the grips drawn for a selected shape's connection control points.

ContextMenuStrip

Provides access to the component's context menu strip.

ControlPointAlpha

Specifies the transparency of control point grips.

Diagram

Provides access to the current diagram.

DiagramSetController

Provides access to the DiagramSetController.

DisplayService

Provides access to the display service.

DrawBounds

Returns the area that is used for drawing the diagram. This is the control's bounds minus the scrollbar's bounds.

GridAlpha

Specifies the transparency of the grid lines.

GridColor

Specifies the color of the grid lines.

GridSize

Specifies the distance between the grid lines.

GripSize

Specifies the size of control point grips.

HiddenLayers

Returns the hidden layers as bitwise combination of LayerIds flags.

HideDeniedMenuItems

Specifies whether menu items that are not granted should be hidden.

HighQualityBackground

Specifies whether the background should be filled with a solid color or color gradient.

HighQualityRendering

Specifies whether high quality or low quality rendering settings should be used for rendering.

See RenderingQualityHighQuality and RenderingQualityLowQuality.

IsGridVisible

Specifies wether the grid should be drawn or not.

IsSheetVisible

Specifies whether the diagram sheet (including its shadow) is visible or not.

MinRotateRange

Specifies the minimum distance of the mouse cursor from the shape's rotate point while rotating.

ProductVersion

The version of the component.

Project

Provides access to the DiagramSetController's project.

PropertyController

Provides access to the display's property controller.

RenderingQualityHighQuality

Specifies the RenderingQuality in high quality mode.

RenderingQualityLowQuality

Specifies the RenderingQuality in low quality mode.

ResizeGripShape

Specifies the shape of the grips drawn for a selected shape's resize control points.

SelectedShapes

Provides an IShapeCollection of selected shapes.

SelectionHighlightColor

Specifies the color of the selection indicator (shape outline and control point grips) when drawing highlighted shapes or grips.

SelectionInactiveColor

Specifies the color of the selection indicator (shape outline and control point grips) when drawing inactive / deactivated shapes or grips.

SelectionNormalColor

Specifies the color of the selection indicator (shape outline and control point grips) when drawing shapes or grips.

ShowDefaultContextMenu

If true, the standard context menu is created from MenuItemDefs. If false, a user defined context menu is shown without creating additional menu items.

ShowScrollBars

Specifies wether the scrollbars should be drawn or not.

SnapDistance

Specifies the distance for snapping shapes and control points to grid lines.

SnapToGrid

Specifies wether shapes and control points should be snapped to grid lines.

ToolPreviewBackColor

Specifies the background color of Tool's preview hints.

ToolPreviewColor

Specifies the foreground color of Tool's preview hints.

ZoomedGripSize

Provides access to the transformed size of grips.

ZoomLevel

Specifies the zoom level in percentage.

ZoomWithMouseWheel

Specifies wether the mouse wheel should be used for zooming.

Public Methods

Name

Description

Clear

Clears the display and all its buffers.

Constructor

Constructs a new instance.

ControlToDiagram

Transforms the given coordinates coordinates to diagram coordinates.

Copy

Copies the selected shapes (with or without model objects).

Cut

Cuts the selected shapes (with or without model objects).

Delete

Deletes the selected shapes (with or without model objects).

DiagramToControl

Transforms the given diagram coordinates to control coordinates.

DrawAnglePreview

Draws a rotation angle preview for rotating shapes.

DrawCaptionBounds

Draws the bounds of a caption's text.

DrawConnectionPoint

Draws a shape's connection control point.

DrawLine

Draws a line in the preview colors.

DrawResizeGrip

Draws a shape's resize control point.

DrawRotateGrip

Draws a shape's rotate control point.

DrawSelectionFrame

Draws a selection frame in preview colors.

DrawShape

Draws the given shape.

DrawShapes

Draws the given shapes.

DrawSnapIndicators

Draws snap indicators for the given shape.

EnsureVisible

Ensures that the given area is visible in the display.

GetMenuItemDefs

Returns a list of MenuItemDefs.

InvalidateDiagram

Invalidates the given region of the diagram.

InvalidateGrips

Invalidates the indicated grips.

InvalidateSnapIndicators

Invalidates the snap indicators of the given shapes.

IsLayerActive

Tests wether all of the given layers are active.

IsLayerVisible

Tests wether any of the given layers is visible.

OpenDiagram

Fetches the indicated diagram from the repository and displays it.

OpenCaptionEditor

Opens a caption editor for the indicated caption.

Paste

Pastes shapes from the copy/paste buffer into the current diagram.

ResetTransformation

Resets transformation of the graphics context.

RestoreTransformation

Restores transformation of the graphics context.

ScreenToDiagram

Transforms screen coordinates to diagram coordinates.

SelectAll

Selects all shapes of the diagram.

SelectShape

Adds the given shape to the collection of selected shapes.

SelectShapes

Adds the given shapes to the collection of selected shapes.

SetCursor

Sets the registered cursor with the given cursor id as the control's cursor.

SetLayerActive

Adds the given layers to the active layers.

SetLayerVisibility

Sets visibility of the given layers.

UnselectAll

Unselect all shapes.

UnselectShape

Unselect the given shapes.

Events

Name

Description

ActiveLayersChanged

Occurs when the active layers were changed.

DiagramChanged

Occurs when the diagram changed.

DiagramChanging

Occurs when the diagram is going to be changed.

LayerVisibilityChanged

Occurs when the visibility of layers was changed.

ShapeClick

Occurs when a shape was clicked.

ShapeDoubleClick

Occurs when a shape was double clicked.

ShapeInsert

Occurs when a shape was inserted into the display's diagram.

ShapeRemove

Occurs when a shape was removed from the display's diagram.

ShapesSelected

Occurs when shapes were selected.

ZoomChanged

Occurs when the zoom level changed.

Protected Properties

Name

Description

DiagramController

The DiagramPresenter's DiagramController.

Protected Properties

Name

Description

Dispose

Implementation of Control.Dispose.

DrawConnectionPointCore

Draws a shape's connection control point grip.

DrawResizeGripCore

Draws a shape's resize control point grip.

DrawRotateGripCore

Draws a shape's rotate control point grip.

Requirements

Namespace: Dataweb.NShape.WinFormsUI

Assembly: Dataweb.NShape.WinFormsUI