TextViewScrollState Struct
Represents a scroll state within an ITextView.
public struct TextViewScrollStateConstructors
TextViewScrollState(TextPosition)
Initializes a new instance of the TextViewScrollState class, using TextViewVerticalAnchorPlacement.Top and no vertical amount offset.
public TextViewScrollState(TextPosition verticalAnchorTextPosition)| Parameter | Type | Description | 
|---|---|---|
| verticalAnchorTextPosition | TextPosition | A TextPosition indicating a character (typically the first) on the anchor view line, around which other view lines are arranged. | 
TextViewScrollState(TextPosition, TextViewVerticalAnchorPlacement, int, int)
Initializes a new instance of the TextViewScrollState class.
public TextViewScrollState(TextPosition verticalAnchorTextPosition, TextViewVerticalAnchorPlacement verticalAnchorPlacement, int verticalAmountOffset, int horizontalAmount)| Parameter | Type | Description | 
|---|---|---|
| verticalAnchorTextPosition | TextPosition | A TextPosition indicating a character (typically the first) on the anchor view line, around which other view lines are arranged. | 
| verticalAnchorPlacement | TextViewVerticalAnchorPlacement | A TextViewVerticalAnchorPlacement indicating the placement of the anchor view line. | 
| verticalAmountOffset | int | The vertical scroll amount to move the anchor view line from its placement, where a positive number means downward and a negative number means upward. | 
| horizontalAmount | int | The horizontal scroll amount (in pixels), which is the absolute first visible x-coordinate in the view. | 
TextViewScrollState(TextPosition, int)
Initializes a new instance of the TextViewScrollState class, using TextViewVerticalAnchorPlacement.Top and no vertical amount offset.
public TextViewScrollState(TextPosition verticalAnchorTextPosition, int horizontalAmount)| Parameter | Type | Description | 
|---|---|---|
| verticalAnchorTextPosition | TextPosition | A TextPosition indicating a character (typically the first) on the anchor view line, around which other view lines are arranged. | 
| horizontalAmount | int | The horizontal scroll amount (in pixels), which is the absolute first visible x-coordinate in the view. | 
Properties
CanScrollPastDocumentEnd
Gets or sets whether the view can scroll past the document end.
public bool CanScrollPastDocumentEnd { get; set; }Property Value
- bool:
- trueif the view can scroll past the document end; otherwise,- false. The default value is- false.
HorizontalAmount
Gets or sets the horizontal scroll amount (in pixels), which is the absolute first visible x-coordinate in the view.
public int HorizontalAmount { get; set; }Property Value
- int:
- The horizontal scroll amount (in pixels), which is the absolute first visible x-coordinate in the view. The default value is - 0.
VerticalAmountOffset
Gets the vertical scroll amount to move the anchor view line from its placement, where a positive number means downward and a negative number means upward.
public int VerticalAmountOffset { get; set; }Property Value
- int:
- The vertical scroll amount to move the anchor view line from its placement, where a positive number means downward and a negative number means upward. The default value is - 0.
VerticalAnchorPlacement
Gets or sets a TextViewVerticalAnchorPlacement indicating the placement of the anchor view line.
public TextViewVerticalAnchorPlacement VerticalAnchorPlacement { get; set; }Property Value
- TextViewVerticalAnchorPlacement:
- A TextViewVerticalAnchorPlacement indicating the placement of the anchor view line. The default value is - Top.
VerticalAnchorTextPosition
Gets or sets a TextPosition indicating a character (typically the first) on the anchor view line, around which other view lines are arranged.
public TextPosition VerticalAnchorTextPosition { get; set; }Property Value
- TextPosition:
- A TextPosition indicating a character (typically the first) on the anchor view line, around which other view lines are arranged. 
Methods
Equals(object)
Determines whether the specified Object is equal to the current Object.
public override bool Equals(object obj)| Parameter | Type | Description | 
|---|---|---|
| obj | object | The  | 
Returns
- bool:
- trueif the specified- Objectis equal to the current- Object; otherwise,- false.
GetHashCode()
Returns a hash code for this object.
public override int GetHashCode()Returns
- int:
- An integer value that specifies a hash value for this object. 
Operators
operator ==(TextViewScrollState, TextViewScrollState)
Compares two TextViewScrollState objects. The result specifies whether the property values of the two TextViewScrollState objects are equal.
public static bool operator ==(TextViewScrollState left, TextViewScrollState right)| Parameter | Type | Description | 
|---|---|---|
| left | TextViewScrollState | A TextViewScrollState to compare. | 
| right | TextViewScrollState | A TextViewScrollState to compare. | 
Returns
- bool:
- trueif the property values of are equal; otherwise,- false.
operator !=(TextViewScrollState, TextViewScrollState)
Compares two TextViewScrollState objects. The result specifies whether the property values of the two TextViewScrollState objects are unequal.
public static bool operator !=(TextViewScrollState left, TextViewScrollState right)| Parameter | Type | Description | 
|---|---|---|
| left | TextViewScrollState | A TextViewScrollState to compare. | 
| right | TextViewScrollState | A TextViewScrollState to compare. | 
Returns
- bool:
- trueif the property values of are unequal; otherwise,- false.