skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI UI for Xamarin

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility and Security
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class CaretPosition

Represents a CaretPosition information.

Inheritance
System.Object
CaretPosition
Namespace: Telerik.Windows.Controls.SyntaxEditor.UI
Assembly: Telerik.Windows.Controls.SyntaxEditor.dll

Syntax

public class CaretPosition : Object, IComparable<CaretPosition>, IEquatable<CaretPosition>, IDisposable

Constructors

CaretPosition(CaretPosition)

Initializes a new instance of the CaretPosition class.

Declaration
public CaretPosition(CaretPosition position)
Parameters
CaretPosition position

The position.

CaretPosition(CaretPosition, PositionAnchoringType)

Initializes a new instance of the CaretPosition class.

Declaration
public CaretPosition(CaretPosition position, PositionAnchoringType anchoringType)
Parameters
CaretPosition position

The position.

PositionAnchoringType anchoringType

Type of the anchoring.

CaretPosition(TextDocument)

Initializes a new instance of the CaretPosition class.

Declaration
public CaretPosition(TextDocument document)
Parameters
TextDocument document

The document.

CaretPosition(TextDocument, Int32, Int32)

Initializes a new instance of the CaretPosition class.

Declaration
public CaretPosition(TextDocument document, int lineNumber, int columnNumber)
Parameters
TextDocument document

The document.

System.Int32 lineNumber

The line number.

System.Int32 columnNumber

The column number.

CaretPosition(TextDocument, Int32, Int32, PositionAnchoringType)

Initializes a new instance of the CaretPosition class.

Declaration
public CaretPosition(TextDocument document, int lineNumber, int columnNumber, PositionAnchoringType anchoringType)
Parameters
TextDocument document

The document.

System.Int32 lineNumber

The line number.

System.Int32 columnNumber

The column number.

PositionAnchoringType anchoringType

Type of the anchoring.

CaretPosition(TextDocument, PositionAnchoringType)

Initializes a new instance of the CaretPosition class.

Declaration
public CaretPosition(TextDocument document, PositionAnchoringType anchoringType)
Parameters
TextDocument document

The document.

PositionAnchoringType anchoringType

Type of the anchoring.

Properties

AnchoringType

Gets the type of the anchoring.

Declaration
public PositionAnchoringType AnchoringType { get; }
Property Value
PositionAnchoringType

The type of the anchoring.

ColumnNumber

Gets the column number.

Declaration
public int ColumnNumber { get; }
Property Value
System.Int32

The column number.

DisplayColumnNumber

Gets the display column number.

Declaration
public int DisplayColumnNumber { get; }
Property Value
System.Int32

The display column number.

DisplayLineNumber

Gets the display line number.

Declaration
public int DisplayLineNumber { get; }
Property Value
System.Int32

The display line number.

Document

Gets the document.

Declaration
public TextDocument Document { get; }
Property Value
TextDocument

The document.

Index

Gets the index.

Declaration
public int Index { get; }
Property Value
System.Int32

The index.

IsAnchored

Gets a value indicating whether this instance is anchored.

Declaration
public bool IsAnchored { get; }
Property Value
System.Boolean

LastTrackedColumn

Gets or sets the last tracked column. NOTE: Used for up/down in non-wrapped scenarios.

Declaration
public int LastTrackedColumn { get; set; }
Property Value
System.Int32

The last tracked column.

LineNumber

Gets the line number.

Declaration
public int LineNumber { get; }
Property Value
System.Int32

The line number.

TabSize

Gets or sets the size of the tab.

Declaration
public int TabSize { get; set; }
Property Value
System.Int32

The size of the tab.

Methods

CompareTo(CaretPosition)

Compares the current object with another object of the same type.

Declaration
public int CompareTo(CaretPosition other)
Parameters
CaretPosition other

An object to compare with this object.

Returns
System.Int32

A value that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other.

ConvertFromIndex(TextDocument, Int32)

Converts from index.

Declaration
public static CaretPosition ConvertFromIndex(TextDocument document, int index)
Parameters
TextDocument document

The document.

System.Int32 index

The index.

Returns
CaretPosition

CaretPosition.

ConvertToIndex(CaretPosition)

Converts to index.

Declaration
public static int ConvertToIndex(CaretPosition position)
Parameters
CaretPosition position

The position.

Returns
System.Int32

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()

Dispose(Boolean)

Releases unmanaged and - optionally - managed resources.

Declaration
protected virtual void Dispose(bool disposing)
Parameters
System.Boolean disposing

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Equals(Object)

Determines whether the specified System.Object is equal to this instance.

Declaration
public override bool Equals(object obj)
Parameters
System.Object obj

The object to compare with the current object.

Returns
System.Boolean

true if the specified System.Object is equal to this instance; otherwise, false.

Equals(CaretPosition)

Indicates whether the current object is equal to another object of the same type.

Declaration
public bool Equals(CaretPosition other)
Parameters
CaretPosition other

An object to compare with this object.

Returns
System.Boolean

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

Returns a hash code for this instance.

Declaration
public override int GetHashCode()
Returns
System.Int32

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

IsAtWordStart()

Determines whether [is at word start].

Declaration
public bool IsAtWordStart()
Returns
System.Boolean

true if [is at word start]; otherwise, false.

MoveLineDown()

Moves the line down.

Declaration
public bool MoveLineDown()
Returns
System.Boolean

true if XXXX, false otherwise.

MoveLineUp()

Moves the line up.

Declaration
public bool MoveLineUp()
Returns
System.Boolean

true if XXXX, false otherwise.

MoveToCurrentWordEnd()

Moves to current word end.

Declaration
public bool MoveToCurrentWordEnd()
Returns
System.Boolean

true if XXXX, false otherwise.

MoveToCurrentWordStart()

Moves to current word start.

Declaration
public bool MoveToCurrentWordStart()
Returns
System.Boolean

true if XXXX, false otherwise.

MoveToEndOfDocument()

Moves to end of document.

Declaration
public void MoveToEndOfDocument()

MoveToHome()

Moves to home.

Declaration
public void MoveToHome()

MoveToIndex(Int32)

Moves to index.

Declaration
public bool MoveToIndex(int indexParameter)
Parameters
System.Int32 indexParameter

The index.

Returns
System.Boolean

true if XXXX, false otherwise.

MoveToLine(Int32)

Moves to line.

Declaration
public void MoveToLine(int lineNumber)
Parameters
System.Int32 lineNumber

MoveToLineEnd()

Moves to line end.

Declaration
public void MoveToLineEnd()

MoveToLineStart()

Moves to line start.

Declaration
public void MoveToLineStart()

MoveToNextCharacter()

Moves to next character.

Declaration
public bool MoveToNextCharacter()
Returns
System.Boolean

true if XXXX, false otherwise.

MoveToNextWord()

Moves to next word.

Declaration
public bool MoveToNextWord()
Returns
System.Boolean

true if XXXX, false otherwise.

MoveToPosition(CaretPosition)

Moves to position.

Declaration
public bool MoveToPosition(CaretPosition position)
Parameters
CaretPosition position

Returns
System.Boolean

MoveToPreviousCharacter()

Moves to previous character.

Declaration
public bool MoveToPreviousCharacter()
Returns
System.Boolean

true if XXXX, false otherwise.

MoveToPreviousWord()

Moves to previous word.

Declaration
public bool MoveToPreviousWord()
Returns
System.Boolean

true if XXXX, false otherwise.

MoveToStartOfDocument()

Moves to start of document.

Declaration
public void MoveToStartOfDocument()

OnPositionChanged()

Called when [position changed].

Declaration
protected virtual void OnPositionChanged()

OnPositionChanging()

Called when [position changing].

Declaration
protected virtual void OnPositionChanging()

ToString()

Returns a System.String that represents this instance.

Declaration
public override string ToString()
Returns
System.String

A System.String that represents this instance.

Events

PositionChanged

PositionChanged event.

Declaration
public event EventHandler PositionChanged
Event Type
System.EventHandler

PositionChanging

PositionChanging event.

Declaration
public event EventHandler PositionChanging
Event Type
System.EventHandler

Operators

Equality(CaretPosition, CaretPosition)

Implements the == operator.

Declaration
public static bool operator ==(CaretPosition left, CaretPosition right)
Parameters
CaretPosition left

The left.

CaretPosition right

The right.

Returns
System.Boolean

The result of the operator.

GreaterThan(CaretPosition, CaretPosition)

Implements the > operator.

Declaration
public static bool operator>(CaretPosition left, CaretPosition right)
Parameters
CaretPosition left

The left.

CaretPosition right

The right.

Returns
System.Boolean

The result of the operator.

GreaterThanOrEqual(CaretPosition, CaretPosition)

Implements the >= operator.

Declaration
public static bool operator >=(CaretPosition left, CaretPosition right)
Parameters
CaretPosition left

The left.

CaretPosition right

The right.

Returns
System.Boolean

The result of the operator.

Inequality(CaretPosition, CaretPosition)

Implements the != operator.

Declaration
public static bool operator !=(CaretPosition left, CaretPosition right)
Parameters
CaretPosition left

The left.

CaretPosition right

The right.

Returns
System.Boolean

The result of the operator.

LessThan(CaretPosition, CaretPosition)

Implements the < operator.

Declaration
public static bool operator <(CaretPosition left, CaretPosition right)
Parameters
CaretPosition left

The left.

CaretPosition right

The right.

Returns
System.Boolean

The result of the operator.

LessThanOrEqual(CaretPosition, CaretPosition)

Implements the <= operator.

Declaration
public static bool operator <=(CaretPosition left, CaretPosition right)
Parameters
CaretPosition left

The left.

CaretPosition right

The right.

Returns
System.Boolean

The result of the operator.

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.

OSZAR »