Class TextSelection
Inheritance
System.Object
TextSelection
Syntax
public class TextSelection : TextRange, IEquatable<TextRange>, IEquatable<TextSelection>
Constructors
TextSelection(Int32, Int32, TextAffinity, Boolean)
Declaration
public TextSelection(int baseOffset, int extentOffset, TextAffinity affinity = TextAffinity.downstream, bool isDirectional = false)
Parameters
Type |
Name |
Description |
System.Int32 |
baseOffset |
|
System.Int32 |
extentOffset |
|
TextAffinity |
affinity |
|
System.Boolean |
isDirectional |
|
Fields
affinity
Declaration
public readonly TextAffinity affinity
Field Value
baseOffset
Declaration
public readonly int baseOffset
Field Value
Type |
Description |
System.Int32 |
|
extentOffset
Declaration
public readonly int extentOffset
Field Value
Type |
Description |
System.Int32 |
|
isDirectional
Declaration
public readonly bool isDirectional
Field Value
Type |
Description |
System.Boolean |
|
Properties
basePos
Declaration
public TextPosition basePos { get; }
Property Value
endPos
Declaration
public TextPosition endPos { get; }
Property Value
extendPos
Declaration
public TextPosition extendPos { get; }
Property Value
startPos
Declaration
public TextPosition startPos { get; }
Property Value
Methods
collapsed(Int32, TextAffinity)
Declaration
public static TextSelection collapsed(int offset, TextAffinity affinity = TextAffinity.downstream)
Parameters
Type |
Name |
Description |
System.Int32 |
offset |
|
TextAffinity |
affinity |
|
Returns
copyWith(Nullable<Int32>, Nullable<Int32>, Nullable<TextAffinity>, Nullable<Boolean>)
Declaration
public TextSelection copyWith(int? baseOffset = default(int? ), int? extentOffset = default(int? ), TextAffinity? affinity = default(TextAffinity? ), bool? isDirectional = default(bool? ))
Parameters
Type |
Name |
Description |
System.Nullable<System.Int32> |
baseOffset |
|
System.Nullable<System.Int32> |
extentOffset |
|
System.Nullable<TextAffinity> |
affinity |
|
System.Nullable<System.Boolean> |
isDirectional |
|
Returns
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
Equals(TextSelection)
Declaration
public bool Equals(TextSelection other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
fromPosition(TextPosition)
Declaration
public static TextSelection fromPosition(TextPosition position)
Parameters
Returns
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
Operators
Equality(TextSelection, TextSelection)
Declaration
public static bool operator ==(TextSelection left, TextSelection right)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Inequality(TextSelection, TextSelection)
Declaration
public static bool operator !=(TextSelection left, TextSelection right)
Parameters
Returns
Type |
Description |
System.Boolean |
|