Freigeben über


ViewState Class

Represents the state of a view in terms of the size of its viewport (the area visible in the document window), visual snapshot, and editable snapshot.

Inheritance Hierarchy

Object
  Microsoft.VisualStudio.Text.Editor.ViewState

Namespace:  Microsoft.VisualStudio.Text.Editor
Assembly:  Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)

Syntax

'Declaration
Public Class ViewState
public class ViewState
public ref class ViewState
type ViewState =  class end
public class ViewState

The ViewState type exposes the following members.

Constructors

  Name Description
Public method ViewState(ITextView) Initializes a new instance of ViewState for the specified text view
Public method ViewState(ITextView, Double, Double) Initializes a new instance of the ViewState for the specified view, viewport width, and viewport height.

Top

Properties

  Name Description
Public property EditSnapshot Gets the view's edit snapshot.
Public property ViewportBottom Gets the y-coordinate of the viewport's bottom edge.
Public property ViewportHeight Gets the height of the viewport.
Public property ViewportLeft Gets the x-coordinate of the viewport's left edge.
Public property ViewportRight Gets the x-coordinate of the viewport's right edge.
Public property ViewportTop Gets the y-coordinate of the viewport's top edge.
Public property ViewportWidth Gets the width of the viewport.
Public property VisualSnapshot Gets the view's visual snapshot.

Top

Methods

  Name Description
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.Text.Editor Namespace