menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class View - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class View

    A view encapsulates a rectangular area inside of a control and renders a Model onto it.

    Inheritance
    System.Object
    View
    Implements
    System.IServiceProvider
    System.Runtime.Serialization.ISerializable
    System.Runtime.Serialization.IDeserializationCallback
    IPrint
    IPropertyObserver
    IPropertyContainer
    IServiceReferenceHolder
    IServiceReferenceProvider
    Namespace: Syncfusion.Windows.Forms.Diagram
    Assembly: Syncfusion.Diagram.Base.dll
    Syntax
    public class View : Component, IServiceProvider, ISerializable, IDeserializationCallback, IPrint, IPropertyObserver, IPropertyContainer, IServiceReferenceHolder, IServiceReferenceProvider
    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.

    Model Controller ViewInfo

    Constructors

    View()

    Initializes a new instance of the View class.

    Declaration
    public View()

    View(SerializationInfo, StreamingContext)

    Initializes a new instance of the View class.

    Declaration
    protected View(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info

    Serialization state information.

    System.Runtime.Serialization.StreamingContext context

    Streaming context information.

    View(Control)

    Initializes a new instance of the View class.

    Declaration
    public View(Control parentControl)
    Parameters
    Type Name Description
    System.Windows.Forms.Control parentControl

    Parent control (i.e. window) hosting the view.

    View(Control, Int32, Int32, Int32, Int32)

    Initializes a new instance of the View class.

    Declaration
    public View(Control parentControl, int top, int left, int width, int height)
    Parameters
    Type Name Description
    System.Windows.Forms.Control parentControl

    Parent control (i.e. window) to host the view.

    System.Int32 top

    Top of view bounds.

    System.Int32 left

    Left of view bounds.

    System.Int32 width

    Width of view bounds.

    System.Int32 height

    Height of view bounds.

    Fields

    m_document

    Reference to the model attached to the view.

    Declaration
    protected Model m_document
    Field Value
    Type
    Model

    m_ptOrigin

    View origin.

    Declaration
    protected PointF m_ptOrigin
    Field Value
    Type
    System.Drawing.PointF

    pgSettings

    Page settings used for printing.

    Declaration
    protected PageSettings pgSettings
    Field Value
    Type
    System.Drawing.Printing.PageSettings

    prtZoom

    Print zooming or fit to page.

    Declaration
    protected PrintZoom prtZoom
    Field Value
    Type
    PrintZoom

    rcBounds

    Bounds of the view.

    Declaration
    protected Rectangle rcBounds
    Field Value
    Type
    System.Drawing.Rectangle

    Properties

    BackgroundColor

    Gets or sets the color used to clear the view before rendering the diagram.

    Declaration
    public Color BackgroundColor { get; set; }
    Property Value
    Type
    System.Drawing.Color
    Remarks

    The background of the view is the region outside of the visible diagram.

    Bounds

    Gets bounds of the view in the parent control specified in device coordinates.

    Declaration
    public Rectangle Bounds { get; }
    Property Value
    Type
    System.Drawing.Rectangle

    ClientRectangle

    Gets or sets the view's ClientRectangle.

    Declaration
    public Rectangle ClientRectangle { get; set; }
    Property Value
    Type
    System.Drawing.Rectangle

    Controller

    Gets or sets the view's controller.

    Declaration
    public Controller Controller { get; set; }
    Property Value
    Type
    Controller

    Cursor

    Gets or sets cursor currently used in the view.

    Declaration
    public virtual Cursor Cursor { get; set; }
    Property Value
    Type
    System.Windows.Forms.Cursor

    CustomHandleRenderer

    Gets or sets view custom handle renderer.

    Declaration
    public UserHandleRenderer CustomHandleRenderer { get; set; }
    Property Value
    Type
    UserHandleRenderer

    EventSink

    Gets the reference to viewer event sink.

    Declaration
    protected ViewerEventSink EventSink { get; }
    Property Value
    Type Description
    ViewerEventSink

    The event sink.

    FullContainerName

    Gets the full name of the container.

    Declaration
    public string FullContainerName { get; }
    Property Value
    Type Description
    System.String

    The full name of the container.

    Grid

    Gets grid of evenly spaced points that provide a visual guide to the user.

    Declaration
    public LayoutGrid Grid { get; }
    Property Value
    Type
    LayoutGrid
    Remarks

    Draws a matrix of evenly spaced points in the view and provides snap to grid calculations.

    LayoutGrid

    HandleAnchorColor

    Gets or sets color used for handles of anchor node. OBSOLETE - property is not needed and was never implemented before should be removed in next version

    Declaration
    [Obsolete("Property is not needed and was never implemented before. Should be removed in next version")]
    public Color HandleAnchorColor { get; set; }
    Property Value
    Type
    System.Drawing.Color

    HandleColor

    Gets or sets color used to draw selection handles. OBSOLETE - property will be no more supported since next version. Use HandleRenderer.HandleColor instead.

    Declaration
    [Obsolete("This property will be no more supported since next version. Use HandleRenderer.HandleColor instead.")]
    public Color HandleColor { get; set; }
    Property Value
    Type
    System.Drawing.Color

    HandleDisabledColor

    Gets or sets color used for handles when disabled. OBSOLETE - property will be no more supported since next version. Use HandleRenderer.HandleDisabledColor instead.

    Declaration
    [Obsolete("This property will be no more supported since next version. Use HandleRenderer.HandleDisabledColor instead.")]
    public Color HandleDisabledColor { get; set; }
    Property Value
    Type
    System.Drawing.Color

    HandleOutlineColor

    Gets or sets color used to draw selection handle outline. OBSOLETE - property will be no more supported since next version. Use HandleRenderer.HandleOutlineColor instead.

    Declaration
    [Obsolete("This property will be no more supported since next version. Use HandleRenderer.HandleOutlineColor instead.")]
    public Color HandleOutlineColor { get; set; }
    Property Value
    Type
    System.Drawing.Color

    HandleRenderer

    Gets or sets view handle renderer.

    Declaration
    public HandleRenderer HandleRenderer { get; set; }
    Property Value
    Type
    HandleRenderer

    HandleSize

    Gets or sets size of selection handles specified in device coordinates. OBSOLETE - property is not needed and was never implemented before. Should be removed in next version

    Declaration
    [Obsolete("Property is not needed and was never implemented before. Should that be removed in next version")]
    public int HandleSize { get; set; }
    Property Value
    Type
    System.Int32

    HandleStyles

    Gets the handle styles collection.

    Declaration
    public static HandleStyles HandleStyles { get; }
    Property Value
    Type Description
    HandleStyles

    The handle styles.

    Height

    Gets height of the view in device coordinates.

    Declaration
    public virtual int Height { get; }
    Property Value
    Type
    System.Int32

    LeftMargin

    Gets width of left margin in device units.

    Declaration
    public virtual int LeftMargin { get; }
    Property Value
    Type
    System.Int32

    LeftMarginBounds

    Gets bounding rectangle of left margin in device units.

    Declaration
    public Rectangle LeftMarginBounds { get; }
    Property Value
    Type
    System.Drawing.Rectangle

    Location

    Gets location of the view in the parent control specified in device coordinates.

    Declaration
    public Point Location { get; }
    Property Value
    Type
    System.Drawing.Point

    Magnification

    Gets or sets the X and Y magnification (zoom) values on a scale of 1 to n.

    Declaration
    public float Magnification { get; set; }
    Property Value
    Type
    System.Single
    Remarks

    This value is used to zoom the view in and out. The X and Y axes can be scaled independently. Normally, the X and Y axes will have the same magnification value.

    The value of this property along with the Origin are used to create the view transform, which is used to map world coordinates onto view coordinates.

    GetViewTransform() Origin

    Model

    Gets or sets the model attached to this view.

    Declaration
    public Model Model { get; set; }
    Property Value
    Type
    Model
    Remarks

    Model

    MouseTrackingEnabled

    Gets or sets a value indicating whether mouse movements are tracked in the margins of the view.

    Declaration
    public bool MouseTrackingEnabled { get; set; }
    Property Value
    Type
    System.Boolean

    Origin

    Gets or sets logical origin of the view in world coordinates.

    Declaration
    public virtual PointF Origin { get; set; }
    Property Value
    Type
    System.Drawing.PointF
    Remarks

    This property moves the view relative to the world coordinate space. The value specifies a point in the world coordinate space that corresponds to the top left corner of the view.

    PageBorderStyle

    Gets or sets properties used to draw the page border.

    Declaration
    public PageBorderStyle PageBorderStyle { get; set; }
    Property Value
    Type
    PageBorderStyle

    PageSettings

    Gets or sets page settings to use when creating a print document for the model.

    Declaration
    public PageSettings PageSettings { get; set; }
    Property Value
    Type
    System.Drawing.Printing.PageSettings

    PageSize

    Gets or sets the size of the page.

    Declaration
    protected Size PageSize { get; set; }
    Property Value
    Type Description
    System.Drawing.Size

    The size of the page.

    PageSizeKnown

    Gets or sets a value indicating whether page size can be used.

    Declaration
    protected bool PageSizeKnown { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if page size can be used; otherwise, false.

    PasteOffsetX

    Gets or sets number of device units to offset nodes in the X direction when they are pasted into a diagram.

    Declaration
    public int PasteOffsetX { get; set; }
    Property Value
    Type
    System.Int32

    PasteOffsetY

    Gets or sets number of device units to offset nodes in the Y direction when they are pasted into a diagram.

    Declaration
    public int PasteOffsetY { get; set; }
    Property Value
    Type
    System.Int32

    PrintZoom

    Gets or sets the diagram printing zoom value. PrintZoom

    Declaration
    public PrintZoom PrintZoom { get; set; }
    Property Value
    Type
    PrintZoom

    ScrollVirtualBounds

    Gets or sets the bounds of scrollable area. Can be set only positive values.

    Declaration
    public RectangleF ScrollVirtualBounds { get; set; }
    Property Value
    Type
    System.Drawing.RectangleF

    SelectionAnchorNode

    Gets node in the selection list that acts as the anchor.

    Declaration
    public INode SelectionAnchorNode { get; }
    Property Value
    Type
    INode
    Remarks

    The anchor node is always the last node in the selection list.

    SelectionList

    SelectionList

    Gets list of nodes that are currently selected. Also, add the shapes programmatically by using the collection property if you need to select.

    Declaration
    public NodeCollection SelectionList { get; }
    Property Value
    Type
    NodeCollection
    Remarks

    Provides access to the controller's selection list. SelectionList

    SelectionListSubstitute

    Gets the selection list substitute.

    Declaration
    public NodeCollection SelectionListSubstitute { get; }
    Property Value
    Type Description
    NodeCollection

    The selection list substitute.

    Size

    Gets or sets size of the view in device coordinates.

    Declaration
    public Size Size { get; set; }
    Property Value
    Type
    System.Drawing.Size

    TopMargin

    Gets height of top margin in device units.

    Declaration
    public virtual int TopMargin { get; }
    Property Value
    Type
    System.Int32

    TopMarginBounds

    Gets bounding rectangle of top margin in device units.

    Declaration
    public Rectangle TopMarginBounds { get; }
    Property Value
    Type
    System.Drawing.Rectangle

    VirtualSize

    Gets the size of the scrollable area in device coordinates.

    Declaration
    public virtual Size VirtualSize { get; }
    Property Value
    Type
    System.Drawing.Size
    Remarks

    The value returned is the width and height of the model converted to device coordinates. If there is no model attached to the view at the time of the call, then the size of the view is returned instead.

    Width

    Gets width of the view in device coordinates.

    Declaration
    public virtual int Width { get; }
    Property Value
    Type
    System.Int32

    WorkArea

    Gets bounding rectangle of view excluding the margins.

    Declaration
    public virtual Rectangle WorkArea { get; }
    Property Value
    Type
    System.Drawing.Rectangle

    X

    Gets X coordinate of the location.

    Declaration
    public virtual int X { get; }
    Property Value
    Type
    System.Int32

    Y

    Gets Y coordinate of the location.

    Declaration
    public virtual int Y { get; }
    Property Value
    Type
    System.Int32

    ZoomIncrement

    Gets or sets the zoom increment value applied to view attached document.

    Declaration
    public int ZoomIncrement { get; set; }
    Property Value
    Type
    System.Int32

    ZoomType

    Gets or sets a value indicating that which type of zooming action to be performed.

    Declaration
    public ZoomType ZoomType { get; set; }
    Property Value
    Type
    ZoomType

    Methods

    ConvertPageMargins(Boolean)

    Called during PageSetup dialog initialization to workaround a measurement units conversion bug in the PageSetupDialog.

    Declaration
    public void ConvertPageMargins(bool beforePageSetup)
    Parameters
    Type Name Description
    System.Boolean beforePageSetup

    TRUE for pre-PageSetup invocation.

    CreateGrid()

    Creates the layout grid that is rendered in the view.

    Declaration
    protected virtual LayoutGrid CreateGrid()
    Returns
    Type Description
    LayoutGrid

    Layout grid to attach to grid.

    Dispose(Boolean)

    Called to release resources held by the view.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    Indicates if this method is being called explicitly by a call to Dispose() or by the destructor through the garbage collector.

    Draw(Graphics)

    Draws the specified graphics.

    Declaration
    public virtual void Draw(Graphics grfx)
    Parameters
    Type Name Description
    System.Drawing.Graphics grfx

    Graphics to draw on.

    Draw(Graphics, RectangleF)

    Renders the view onto a System.Drawing.Graphics context object.

    Declaration
    public virtual void Draw(Graphics grfx, RectangleF rectClip)
    Parameters
    Type Name Description
    System.Drawing.Graphics grfx

    Graphics context object to render to.

    System.Drawing.RectangleF rectClip

    Specifies document's area which will be rendered.

    Remarks

    This method first renders the view onto the back buffer. It fills the buffer with the view's background color, draws the grid and page bounds, and then draws the model. Then paints the back buffer onto the graphics context.

    Draw(Graphics, RectangleF, SelectorStyleInfo)

    Declaration
    public virtual void Draw(Graphics grfx, RectangleF rectClip, SelectorStyleInfo themeStyle)
    Parameters
    Type Name Description
    System.Drawing.Graphics grfx
    System.Drawing.RectangleF rectClip
    SelectorStyleInfo themeStyle

    DrawDocumentBackground(Graphics, RectangleF)

    Draws the document background.

    Declaration
    protected virtual void DrawDocumentBackground(Graphics gfx, RectangleF rectDocument)
    Parameters
    Type Name Description
    System.Drawing.Graphics gfx

    Graphics to draw on.

    System.Drawing.RectangleF rectDocument

    The document bounds.

    DrawHandles(Graphics, NodeCollection)

    Draws the handles.

    Declaration
    protected virtual void DrawHandles(Graphics grfx, NodeCollection nodesSelected)
    Parameters
    Type Name Description
    System.Drawing.Graphics grfx

    Graphics to draw on.

    NodeCollection nodesSelected

    The nodes selected.

    DrawMarginIntersection(Graphics)

    Draws the upper-left hand corner of the margin where the left and top margins intersect.

    Declaration
    protected virtual void DrawMarginIntersection(Graphics grfx)
    Parameters
    Type Name Description
    System.Drawing.Graphics grfx

    Graphics context to render to.

    Remarks

    The default implementation fills the rectangular area with the ruler fill color.

    DrawPadding(Graphics, RectangleF)

    Calculating the bounds area of the padding

    Declaration
    protected virtual void DrawPadding(Graphics gfx, RectangleF rectDocument)
    Parameters
    Type Name Description
    System.Drawing.Graphics gfx

    Graphics to draw on.

    System.Drawing.RectangleF rectDocument

    Model Bounds

    DrawPageBorders(Graphics)

    Draws a border around the page.

    Declaration
    protected virtual void DrawPageBorders(Graphics grfx)
    Parameters
    Type Name Description
    System.Drawing.Graphics grfx

    Graphics context object on which to draw.

    See Also
    PageBorderStyle
    PageBorderStyle

    DrawPageBounds(Graphics)

    Draws lines on the view that indicate where page boundaries exist.

    Declaration
    protected virtual void DrawPageBounds(Graphics grfx)
    Parameters
    Type Name Description
    System.Drawing.Graphics grfx

    Graphics context object on which to draw.

    See Also
    PageSettings

    ExportDiagramAsImage(Boolean)

    Exports a representation of the diagram as a bitmap image.

    Declaration
    public virtual Image ExportDiagramAsImage(bool bClipModelBounds)
    Parameters
    Type Name Description
    System.Boolean bClipModelBounds

    if set to true [b clip model bounds].

    Returns
    Type Description
    System.Drawing.Image

    A System.Drawing.Bitmap value.

    ExportDiagramAsImage(Boolean, PixelFormat)

    Exports a representation of the diagram as a bitmap image.

    Declaration
    public virtual Image ExportDiagramAsImage(bool bClipModelBounds, PixelFormat pixelFormat)
    Parameters
    Type Name Description
    System.Boolean bClipModelBounds

    if set to true [b clip model bounds].

    System.Drawing.Imaging.PixelFormat pixelFormat

    given pixel format

    Returns
    Type Description
    System.Drawing.Image

    A System.Drawing.Bitmap value.

    ExportDiagramToGraphics(Graphics)

    Renders a representation of the diagram onto the provided System.Drawing.Graphics object.

    Declaration
    public virtual void ExportDiagramToGraphics(Graphics grfx)
    Parameters
    Type Name Description
    System.Drawing.Graphics grfx

    The graphics.

    ExportDiagramToGraphics(Graphics, Boolean)

    Renders a representation of the diagram onto the provided System.Drawing.Graphics object.

    Declaration
    public virtual void ExportDiagramToGraphics(Graphics grfx, bool bClipModelBounds)
    Parameters
    Type Name Description
    System.Drawing.Graphics grfx

    The graphics.

    System.Boolean bClipModelBounds

    if set to true clip model bounds.

    ExportDiagramToGraphics(Graphics, RectangleF)

    Draw the diagram to specified graphics.

    Declaration
    public void ExportDiagramToGraphics(Graphics grfx, RectangleF rcDrawArea)
    Parameters
    Type Name Description
    System.Drawing.Graphics grfx

    Graphics to draw on.

    System.Drawing.RectangleF rcDrawArea

    The drawing area.

    FitDocument()

    Fit the document on control field.

    Declaration
    public void FitDocument()

    GetObjectData(SerializationInfo, StreamingContext)

    Populates a SerializationInfo with the data needed to serialize the target object.

    Declaration
    protected virtual void GetObjectData(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info

    SerializationInfo object to populate.

    System.Runtime.Serialization.StreamingContext context

    Destination streaming context.

    GetPropertyContainerByName(String)

    Gets the name of the property container by.

    Declaration
    public object GetPropertyContainerByName(string strPropertyName)
    Parameters
    Type Name Description
    System.String strPropertyName

    Name of the property.

    Returns
    Type Description
    System.Object

    The object.

    GetService(Type)

    Returns the specified type of service object the caller.

    Declaration
    protected override object GetService(Type svcType)
    Parameters
    Type Name Description
    System.Type svcType

    Type of service requested.

    Returns
    Type Description
    System.Object

    The object matching the service type requested or NULL if the service is not supported.

    Remarks

    This method is similar to COM's IUnknown::QueryInterface method, although more generic. Instead of just returning interfaces, this method can return any type of object.

    GetViewInfo()

    Creates a ViewInfo object and initializes it with the View data.

    Declaration
    public virtual ViewInfo GetViewInfo()
    Returns
    Type Description
    ViewInfo

    A ViewInfo object.

    GetViewTransform()

    Returns a transformation matrix that maps world coordinates to view coordinates.

    Declaration
    public virtual Matrix GetViewTransform()
    Returns
    Type Description
    System.Drawing.Drawing2D.Matrix

    Transformation matrix.

    Remarks

    The view transformation maps world coordinates to view coordinates. It is calculated by translating by the offset specified in the Origin property and scaling by the value in the Magnification property.

    Origin Magnification

    GetViewTransform(PointF)

    Returns transform matrix based on the given origin.

    Declaration
    public virtual Matrix GetViewTransform(PointF origin)
    Parameters
    Type Name Description
    System.Drawing.PointF origin

    origin to tranform

    Returns
    Type Description
    System.Drawing.Drawing2D.Matrix

    Transformation matrix.

    Initialize(Control)

    Attaches the view to a given parent control.

    Declaration
    public virtual void Initialize(Control parentControl)
    Parameters
    Type Name Description
    System.Windows.Forms.Control parentControl

    Parent control hosting the view.

    OnDeserialization(Object)

    Called when deserialization is complete.

    Declaration
    protected virtual void OnDeserialization(object sender)
    Parameters
    Type Name Description
    System.Object sender

    Object performing the deserialization.

    OnMagnificationChanged(ViewMagnificationEventArgs)

    Called when the origin of the view changes.

    Declaration
    protected virtual void OnMagnificationChanged(ViewMagnificationEventArgs evtArgs)
    Parameters
    Type Name Description
    ViewMagnificationEventArgs evtArgs

    A ViewOriginEventArgs that contains the event data.

    OnOriginChanged(ViewOriginEventArgs)

    Called when the origin of the view changes.

    Declaration
    protected virtual void OnOriginChanged(ViewOriginEventArgs evtArgs)
    Parameters
    Type Name Description
    ViewOriginEventArgs evtArgs

    A ViewOriginEventArgs that contains the event data.

    OnPropertyChanged(String, String)

    Called when property changed.

    Declaration
    public void OnPropertyChanged(string strPropertyContainerName, string strPropertyName)
    Parameters
    Type Name Description
    System.String strPropertyContainerName

    Name of the property container.

    System.String strPropertyName

    Name of the property.

    OnPropertyChanging(String, String, Object)

    Called when property changing.

    Declaration
    public bool OnPropertyChanging(string strPropertyContainerName, string strPropertyName, object newValue)
    Parameters
    Type Name Description
    System.String strPropertyContainerName

    Name of the property container.

    System.String strPropertyName

    Name of the property.

    System.Object newValue

    The new value.

    Returns
    Type Description
    System.Boolean

    true, if property changing.

    PrintPage(PrintPageEventArgs)

    Prints a page to the specified output device.

    Declaration
    protected virtual void PrintPage(PrintPageEventArgs evtArgs)
    Parameters
    Type Name Description
    System.Drawing.Printing.PrintPageEventArgs evtArgs

    Event arguments.

    ProvideServiceReference(RuntimeTypeHandle)

    Get the service reference from provider.

    Declaration
    public object ProvideServiceReference(RuntimeTypeHandle typeHandle)
    Parameters
    Type Name Description
    System.RuntimeTypeHandle typeHandle

    Type handle

    Returns
    Type Description
    System.Object

    The object.

    QueryPageSettings(QueryPageSettingsEventArgs)

    Appends margins to printed page.

    Declaration
    protected virtual void QueryPageSettings(QueryPageSettingsEventArgs evtArgs)
    Parameters
    Type Name Description
    System.Drawing.Printing.QueryPageSettingsEventArgs evtArgs

    QueryPageSettings arguments.

    RefreshPageSettings()

    Refreshes the view's page size with the new bounds obtained from the PageSettings property.

    Declaration
    public virtual void RefreshPageSettings()
    Remarks

    Call this method when the View's page settings have undergone a change.

    ScrollBy(Single, Single)

    Scrolls the view origin by a given X and Y offset.

    Declaration
    public virtual void ScrollBy(float dx, float dy)
    Parameters
    Type Name Description
    System.Single dx

    X offset.

    System.Single dy

    Y offset.

    ScrollToInvisibleNode(Node, Positions)

    Scrolls to the invisible node to bring it into view.

    Declaration
    public void ScrollToInvisibleNode(Node node, Positions position)
    Parameters
    Type Name Description
    Node node

    The node to bring into view

    Positions position

    The position to place the node

    ScrollToInvisibleNode(String, Positions)

    Scrolls to the invisible node to bring it into view.

    Declaration
    public void ScrollToInvisibleNode(string nodeName, Positions position)
    Parameters
    Type Name Description
    System.String nodeName

    The node name

    Positions position

    The position to place the node

    ScrollToNode(Node)

    Scrolls to the node to bring it into view.

    Declaration
    public void ScrollToNode(Node node)
    Parameters
    Type Name Description
    Node node

    The node to bring into view

    ScrollToNode(String)

    Scrolls to the node to bring it into view.

    Declaration
    public void ScrollToNode(string nodeName)
    Parameters
    Type Name Description
    System.String nodeName

    The node name

    SetViewInfo(ViewInfo)

    Initializes the View with data from the ViewInfo object.

    Declaration
    public virtual void SetViewInfo(ViewInfo vwinfo)
    Parameters
    Type Name Description
    ViewInfo vwinfo

    A ViewInfo object.

    SnapPointToGrid(PointF)

    Takes a device point and returns the nearest grid point.

    Declaration
    public PointF SnapPointToGrid(PointF ptDevIn)
    Parameters
    Type Name Description
    System.Drawing.PointF ptDevIn

    Point to snap.

    Returns
    Type Description
    System.Drawing.PointF

    Point on the grid nearest the input point.

    Remarks

    Grid

    SnapPointToGrid(Single, Single)

    Takes a device point and returns the nearest grid point.

    Declaration
    public PointF SnapPointToGrid(float x, float y)
    Parameters
    Type Name Description
    System.Single x

    X coordinate of point to snap.

    System.Single y

    Y coordinate of point to snap.

    Returns
    Type Description
    System.Drawing.PointF

    Point on the grid nearest the input point.

    Remarks

    Grid

    UpdateServiceReferences(IServiceReferenceProvider)

    Updates the service references.

    Declaration
    public virtual void UpdateServiceReferences(IServiceReferenceProvider provider)
    Parameters
    Type Name Description
    IServiceReferenceProvider provider

    The provider.

    ZoomIn()

    Zoom in the document.

    Declaration
    public void ZoomIn()

    ZoomOut()

    Zoom out the document.

    Declaration
    public void ZoomOut()

    ZoomToActual()

    Zoom the document to the actual.

    Declaration
    public void ZoomToActual()

    ZoomToSelection(RectangleF)

    Zoom the document to the selection

    Declaration
    public void ZoomToSelection(RectangleF rectSelection)
    Parameters
    Type Name Description
    System.Drawing.RectangleF rectSelection

    The selection rectangle in client coordinates.

    Explicit Interface Implementations

    IPrint.PrintPage(PrintPageEventArgs)

    Prints a page to the specified output device.

    Declaration
    void IPrint.PrintPage(PrintPageEventArgs evtArgs)
    Parameters
    Type Name Description
    System.Drawing.Printing.PrintPageEventArgs evtArgs

    Event arguments.

    IPrint.QueryPageSettings(QueryPageSettingsEventArgs)

    Appends margins to printed page.

    Declaration
    void IPrint.QueryPageSettings(QueryPageSettingsEventArgs evtArgs)
    Parameters
    Type Name Description
    System.Drawing.Printing.QueryPageSettingsEventArgs evtArgs

    QueryPageSettings arguments.

    IServiceProvider.GetService(Type)

    Returns the specified type of service object to the caller.

    Declaration
    object IServiceProvider.GetService(Type svcType)
    Parameters
    Type Name Description
    System.Type svcType

    Type of service requested.

    Returns
    Type Description
    System.Object

    The object matching the service type requested or NULL if the service is not supported.

    IDeserializationCallback.OnDeserialization(Object)

    Called when deserialization is complete.

    Declaration
    void IDeserializationCallback.OnDeserialization(object sender)
    Parameters
    Type Name Description
    System.Object sender

    Object performing the deserialization.

    ISerializable.GetObjectData(SerializationInfo, StreamingContext)

    Populates a SerializationInfo with the data needed to serialize the target object.

    Declaration
    void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info

    SerializationInfo object to populate.

    System.Runtime.Serialization.StreamingContext context

    Destination streaming context.

    Implements

    System.IServiceProvider
    System.Runtime.Serialization.ISerializable
    System.Runtime.Serialization.IDeserializationCallback
    IPrint
    IPropertyObserver
    IPropertyContainer
    IServiceReferenceHolder
    IServiceReferenceProvider
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved