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
System.Object
Microsoft.VisualStudio.Text.Editor.ViewState
Namespace: Microsoft.VisualStudio.Text.Editor
Assembly: Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)
Syntax
‘선언
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 | |
---|---|---|
ViewState(ITextView) | Initializes a new instance of ViewState for the specified text view | |
ViewState(ITextView, Double, Double) | Initializes a new instance of the ViewState for the specified view, viewport width, and viewport height. |
Top
Properties
Name | Description | |
---|---|---|
EditSnapshot | Gets the view's edit snapshot. | |
ViewportBottom | Gets the y-coordinate of the viewport's bottom edge. | |
ViewportHeight | Gets the height of the viewport. | |
ViewportLeft | Gets the x-coordinate of the viewport's left edge. | |
ViewportRight | Gets the x-coordinate of the viewport's right edge. | |
ViewportTop | Gets the y-coordinate of the viewport's top edge. | |
ViewportWidth | Gets the width of the viewport. | |
VisualSnapshot | Gets the view's visual snapshot. |
Top
Methods
Name | Description | |
---|---|---|
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
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.