Syncfusion.Diagram.Base
Members 


View Class

A view encapsulates a rectangular area inside of a control and renders a Model onto it.
Object Model
View ClassController ClassUserHandleRenderer ClassViewerEventSink ClassLayoutGrid ClassHandleRenderer ClassHandleStyles ClassModel ClassPageBorderStyle ClassPrintZoom ClassINode InterfaceNodeCollection ClassNode Class
Syntax
'Declaration
 
<TypeConverterAttribute(Syncfusion.Windows.Forms.Diagram.ViewConverter)>
<ToolboxItemAttribute(False)>
<DesignerCategoryAttribute("Component")>
<SerializableAttribute()>
Public Class View 
   Inherits System.ComponentModel.Component
   Implements IPrint, IPropertyContainer, IPropertyObserver, IServiceReferenceHolder, IServiceReferenceProvider 
'Usage
 
Dim instance As View
Remarks

A view is responsible for rendering the diagram onto a control surface (i.e. window). It contains a reference to a Model which contains the data portion of the diagram. The view renders the model onto a System.Drawing.Graphics context object belonging to the control that the view is hosted in. The view also renders other visual cues and decorations that are not persisted in the model, such as selection handles.

The view is responsible for conversions between world, view, and device coordinates. The model belongs to the world coordinate space. The view maps world coordinates onto view coordinates by applying its Magnification and Origin settings, which are used to implement zooming and scrolling. In other words, world coordinates are mapped to view coordinates by applying a transformation that translates to the origin and scales by a magnification percentage. Both world and view coordinates are stored as floating point numbers. View coordinates are mapped to device coordinates based on the MeasurementUnits settings in the model and the resolution (DPI) of the output device. The default PageUnit setting is pixel and the default PageScale setting is 1, which results in a 1-1 mapping from view to device coordinates. If the PageUnit is set to Inch, the PageScale is 0.5, and the resolution is 96 dpi then 1 logical unit in view coordinates will equal (1 * 96) * 0.5 = 48 pixels.

The view provides methods for performing hit testing nodes, selection handles, vertices, and ports. The hit testing methods take points in device coordinates and perform the necessary conversion to world coordinates.

The view also provides methods for drawing tracking objects. A tracking object is an outline of a rectangle or shape that is moved or tracked across the screen in response to mouse movements. The view has methods for drawing tracking outlines of rectangles, lines, polygons, curves, and System.Drawing.GraphicsPath objects.

The view contains public methods that can be called to render and repaint onto the host control. The view uses a technique called back buffering, which divides rendering into two stages. First, the view renders onto a memory-based bitmap image (the back buffer). The back buffer is then painted onto the host control. This technique eliminates flicker and has the added benefit of leaving the view with an in-memory representation of the last frame it rendered.

Inheritance Hierarchy

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         Syncfusion.Windows.Forms.Diagram.View

AssemblyVersion

Syncfusion.Diagram.Base: 18.2460.0.44

See Also