In This Article

TextViewScrollState Struct

Represents a scroll state within an ITextView.

public struct TextViewScrollState

Constructors

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, Double, Double)

Initializes a new instance of the TextViewScrollState class.

public TextViewScrollState(TextPosition verticalAnchorTextPosition, TextViewVerticalAnchorPlacement verticalAnchorPlacement, double verticalAmountOffset, double 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 System.Double

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 System.Double

The horizontal scroll amount (in pixels), which is the absolute first visible x-coordinate in the view.

TextViewScrollState(TextPosition, Double)

Initializes a new instance of the TextViewScrollState class, using TextViewVerticalAnchorPlacement.Top and no vertical amount offset.

public TextViewScrollState(TextPosition verticalAnchorTextPosition, double 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 System.Double

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

System.Boolean:

true if 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 double HorizontalAmount { get; set; }

Property Value

System.Double:

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 double VerticalAmountOffset { get; set; }

Property Value

System.Double:

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 System.Object

The Object to compare to the current Object.

Returns

System.Boolean:

true if the specified Object is equal to the current Object; otherwise, false.

GetHashCode()

Returns a hash code for this object.

public override int GetHashCode()

Returns

System.Int32:

An integer value that specifies a hash value for this object.

Operators

Equality(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

System.Boolean:

true if the property values of are equal; otherwise, false.

Inequality(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

System.Boolean:

true if the property values of are unequal; otherwise, false.

Inherited Members

  • System.ValueType.ToString()
  • System.Object.Equals(System.Object, System.Object)
  • System.Object.ReferenceEquals(System.Object, System.Object)
  • System.Object.GetType()