skip navigation
  • Product Bundles

    DevCraft

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

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

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

    Mobile

    UI for .NET MAUI

    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 Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free 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
    • 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 SyntaxEditorPresenter

Editing, Scrolling, Layers.

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

Syntax

public class SyntaxEditorPresenter : ContentControl, ISyntaxEditorPresenter, IDisposable

Constructors

SyntaxEditorPresenter()

Initializes a new instance of the SyntaxEditorPresenter class.

Declaration
public SyntaxEditorPresenter()

Fields

DragMargin

The drag margin.

Declaration
protected static readonly double DragMargin
Field Value
System.Double

MaxSize

The maximum size constant.

Declaration
public static readonly Size MaxSize
Field Value
System.Windows.Size

Properties

Caret

Gets the caret.

Declaration
public Caret Caret { get; }
Property Value
Caret

The caret.

CaretDisplayMode

Gets or sets the caret display mode.

Declaration
public CaretDisplayMode CaretDisplayMode { get; set; }
Property Value
CaretDisplayMode

The caret display mode.

HorizontalScrollOffset

Gets or sets the horizontal scroll offset.

Declaration
public double HorizontalScrollOffset { get; protected set; }
Property Value
System.Double

The horizontal scroll offset.

IsPresenterFocused

Gets a value indicating whether this instance is presenter focused.

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

true if this instance is presenter focused; otherwise, false.

Owner

Gets or sets the owner.

Declaration
public RadSyntaxEditor Owner { get; set; }
Property Value
RadSyntaxEditor

The owner.

VerticalScrollOffset

Gets or sets the vertical scroll offset.

Declaration
public double VerticalScrollOffset { get; protected set; }
Property Value
System.Double

The vertical scroll offset.

Viewport

Gets the viewport.

Declaration
public Rect Viewport { get; }
Property Value
System.Windows.Rect

The viewport.

Implements
ISyntaxEditorPresenter.Viewport

Methods

ArrangeOverride(Size)

When overridden in a derived class, positions child elements and determines a size for a System.Windows.FrameworkElement derived class.

Declaration
protected override Size ArrangeOverride(Size arrangeBounds)
Parameters
System.Windows.Size arrangeBounds

The final area within the parent that this element should use to arrange itself and its children.

Returns
System.Windows.Size

The actual size used.

Dispose()

Called when instance is disposed.

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.

FocusCaret()

Focuses the caret.

Declaration
public void FocusCaret()

GetDocumentPointFromPosition(CaretPosition)

Gets the document point from position.

Declaration
public Point GetDocumentPointFromPosition(CaretPosition position)
Parameters
CaretPosition position

The position.

Returns
System.Windows.Point

Point.

Implements
ISyntaxEditorPresenter.GetDocumentPointFromPosition(CaretPosition)

GetDocumentPointFromViewPoint(Point)

Gets the document point from view point.

Declaration
public Point GetDocumentPointFromViewPoint(Point point)
Parameters
System.Windows.Point point

The point.

Returns
System.Windows.Point

Point.

Implements
ISyntaxEditorPresenter.GetDocumentPointFromViewPoint(Point)

GetPositionFromViewPoint(Point)

Gets the position from view point.

Declaration
public CaretPosition GetPositionFromViewPoint(Point point)
Parameters
System.Windows.Point point

The position.

Returns
CaretPosition

CaretPosition.

Implements
ISyntaxEditorPresenter.GetPositionFromViewPoint(Point)

GetViewPointFromDocumentPoint(Point)

Gets the view point from document point.

Declaration
public Point GetViewPointFromDocumentPoint(Point point)
Parameters
System.Windows.Point point

The point.

Returns
System.Windows.Point

Point.

Implements
ISyntaxEditorPresenter.GetViewPointFromDocumentPoint(Point)

GetViewPointFromPosition(CaretPosition)

Gets the view point from position.

Declaration
public Point GetViewPointFromPosition(CaretPosition position)
Parameters
CaretPosition position

The position.

Returns
System.Windows.Point

Point.

Implements
ISyntaxEditorPresenter.GetViewPointFromPosition(CaretPosition)

HideDropMarker()

Hides the drop marker.

Declaration
public void HideDropMarker()
Implements
ISyntaxEditorPresenter.HideDropMarker()

InvalidateAndUpdateLayout()

Invalidates the and update layout.

Declaration
protected void InvalidateAndUpdateLayout()

InvalidateLayout()

Invalidates the layout.

Declaration
protected void InvalidateLayout()

InvalidateLayout(Boolean)

Invalidates the layout.

Declaration
public void InvalidateLayout(bool force)
Parameters
System.Boolean force

MeasureOverride(Size)

When overridden in a derived class, measures the size in layout required for child elements and determines a size for the System.Windows.FrameworkElement-derived class.

Declaration
protected override Size MeasureOverride(Size constraint)
Parameters
System.Windows.Size constraint

The available size that this element can give to child elements. Infinity can be specified as a value to indicate that the element will size to whatever content is available.

Returns
System.Windows.Size

The size that this element determines it needs during layout, based on its calculations of child element sizes.

MoveCaretToPositionInView(CaretPosition, Point, Boolean)

Moves the caret to position in view.

Declaration
public void MoveCaretToPositionInView(CaretPosition caretPosition, Point positionInView, bool moveToNextIfOutOfBox)
Parameters
CaretPosition caretPosition

The caret position.

System.Windows.Point positionInView

The position in view.

System.Boolean moveToNextIfOutOfBox

If set to true [move to next if out of box].

Implements
ISyntaxEditorPresenter.MoveCaretToPositionInView(CaretPosition, Point, Boolean)

MoveDropMarker(CaretPosition)

Moves the drop marker.

Declaration
public void MoveDropMarker(CaretPosition position)
Parameters
CaretPosition position

The position.

Implements
ISyntaxEditorPresenter.MoveDropMarker(CaretPosition)

OnGotFocus(RoutedEventArgs)

Invoked whenever an unhandled System.Windows.UIElement.GotFocus event reaches this element in its route.

Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
System.Windows.RoutedEventArgs e

The System.Windows.RoutedEventArgs that contains the event data.

OnMouseLeftButtonDown(MouseButtonEventArgs)

Invoked when an unhandled System.Windows.UIElement.MouseLeftButtonDown routed event is raised on this element. Implement this method to add class handling for this event.

Declaration
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters
System.Windows.Input.MouseButtonEventArgs e

The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was pressed.

OnMouseLeftButtonUp(MouseButtonEventArgs)

Invoked when an unhandled System.Windows.UIElement.MouseLeftButtonUp routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

Declaration
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
Parameters
System.Windows.Input.MouseButtonEventArgs e

The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was released.

OnMouseMove(MouseEventArgs)

Invoked when an unhandled System.Windows.Input.Mouse.MouseMove attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
System.Windows.Input.MouseEventArgs e

The System.Windows.Input.MouseEventArgs that contains the event data.

OnMouseRightButtonDown(MouseButtonEventArgs)

Invoked when an unhandled System.Windows.UIElement.MouseRightButtonDown routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

Declaration
protected override void OnMouseRightButtonDown(MouseButtonEventArgs e)
Parameters
System.Windows.Input.MouseButtonEventArgs e

The System.Windows.Input.MouseButtonEventArgs that contains the event data. The event data reports that the right mouse button was pressed.

OnViewportChanged()

Called when [viewport changed].

Declaration
protected virtual void OnViewportChanged()

SetHorizontalOffset(Double)

Sets the horizontal offset.

Declaration
public void SetHorizontalOffset(double offset)
Parameters
System.Double offset

The offset.

SetVerticalOffset(Double)

Sets the vertical offset.

Declaration
public void SetVerticalOffset(double offset)
Parameters
System.Double offset

The offset.

ShowDropMarker(CaretPosition)

Shows the drop marker.

Declaration
public void ShowDropMarker(CaretPosition position)
Parameters
CaretPosition position

The position.

Implements
ISyntaxEditorPresenter.ShowDropMarker(CaretPosition)

UpdateScrollBar(Double, Double, ScrollBar, ScrollBarVisibility)

Updates the scroll bar.

Declaration
protected static void UpdateScrollBar(double viewportSize, double max, ScrollBar scrollBar, ScrollBarVisibility suggestedVisibility)
Parameters
System.Double viewportSize

Size of the viewport.

System.Double max

The maximum.

System.Windows.Controls.Primitives.ScrollBar scrollBar

The scroll bar.

System.Windows.Controls.ScrollBarVisibility suggestedVisibility

The suggested visibility.

Events

ViewportChanged

Occurs when [viewport changed].

Declaration
public event EventHandler ViewportChanged
Event Type
System.EventHandler

Implements
ISyntaxEditorPresenter.ViewportChanged

Explicit Interface Implementations

ISyntaxEditorPresenter.Editor

Gets the editor.

Declaration
RadSyntaxEditor ISyntaxEditorPresenter.Editor { get; }
Returns
RadSyntaxEditor

The editor.

Implements
ISyntaxEditorPresenter.Editor

ISyntaxEditorPresenter.HorizontalScrollOffset

Gets the horizontal scroll offset.

Declaration
double ISyntaxEditorPresenter.HorizontalScrollOffset { get; }
Returns
System.Double

The horizontal scroll offset.

Implements
ISyntaxEditorPresenter.HorizontalScrollOffset

ISyntaxEditorPresenter.VerticalScrollOffset

Gets the vertical scroll offset.

Declaration
double ISyntaxEditorPresenter.VerticalScrollOffset { get; }
Returns
System.Double

The vertical scroll offset.

Implements
ISyntaxEditorPresenter.VerticalScrollOffset

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.