Class
SyntaxEditorPresenter

Editing, Scrolling, Layers.

Definition

Namespace:Telerik.Windows.Controls.SyntaxEditor.UI

Assembly:Telerik.Windows.Controls.SyntaxEditor.dll

Syntax:

cs-api-definition
public class SyntaxEditorPresenter : ContentControl, ISyntaxEditorPresenter, IDisposable

Inheritance: objectSyntaxEditorPresenter

Implements: IDisposableISyntaxEditorPresenter

Constructors

SyntaxEditorPresenter()

Initializes a new instance of the SyntaxEditorPresenter class.

Declaration

cs-api-definition
public SyntaxEditorPresenter()

Fields

DragMargin

The drag margin.

Declaration

cs-api-definition
protected static readonly double DragMargin

Field Value

double

MaxSize

The maximum size constant.

Declaration

cs-api-definition
public static readonly Size MaxSize

Field Value

Size

Properties

Caret

Gets the caret.

Declaration

cs-api-definition
public Caret Caret { get; }

Property Value

Caret

The caret.

CaretDisplayMode

Gets or sets the caret display mode.

Declaration

cs-api-definition
public CaretDisplayMode CaretDisplayMode { get; set; }

Property Value

CaretDisplayMode

The caret display mode.

HorizontalScrollOffset

Gets or sets the horizontal scroll offset.

Declaration

cs-api-definition
public double HorizontalScrollOffset { get; protected set; }

Property Value

double

The horizontal scroll offset.

IsPresenterFocused

Gets a value indicating whether this instance is presenter focused.

Declaration

cs-api-definition
public bool IsPresenterFocused { get; }

Property Value

bool

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

Owner

Gets or sets the owner.

Declaration

cs-api-definition
public RadSyntaxEditor Owner { get; set; }

Property Value

RadSyntaxEditor

The owner.

VerticalScrollOffset

Gets or sets the vertical scroll offset.

Declaration

cs-api-definition
public double VerticalScrollOffset { get; protected set; }

Property Value

double

The vertical scroll offset.

Viewport

Gets the viewport.

Declaration

cs-api-definition
public Rect Viewport { get; }

Property Value

Rect

The viewport.

Implements ISyntaxEditorPresenter.Viewport

Methods

ArrangeOverride(Size)

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

Declaration

cs-api-definition
protected override Size ArrangeOverride(Size arrangeBounds)

Parameters

arrangeBounds

Size

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

Returns

Size

The actual size used.

Dispose()

Called when instance is disposed.

Declaration

cs-api-definition
public void Dispose()

Implements IDisposable.Dispose()

Dispose(bool)

Releases unmanaged and - optionally - managed resources.

Declaration

cs-api-definition
protected virtual void Dispose(bool disposing)

Parameters

disposing

bool

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

FocusCaret()

Focuses the caret.

Declaration

cs-api-definition
public void FocusCaret()

GetDocumentPointFromPosition(CaretPosition)

Gets the document point from position.

Declaration

cs-api-definition
public Point GetDocumentPointFromPosition(CaretPosition position)

Parameters

position

CaretPosition

The position.

Returns

Point

Point.

Implements ISyntaxEditorPresenter.GetDocumentPointFromPosition(CaretPosition)

GetDocumentPointFromViewPoint(Point)

Gets the document point from view point.

Declaration

cs-api-definition
public Point GetDocumentPointFromViewPoint(Point point)

Parameters

point

Point

The point.

Returns

Point

Point.

Implements ISyntaxEditorPresenter.GetDocumentPointFromViewPoint(Point)

GetPositionFromViewPoint(Point)

Gets the position from view point.

Declaration

cs-api-definition
public CaretPosition GetPositionFromViewPoint(Point point)

Parameters

point

Point

The position.

Returns

CaretPosition

CaretPosition.

Implements ISyntaxEditorPresenter.GetPositionFromViewPoint(Point)

GetViewPointFromDocumentPoint(Point)

Gets the view point from document point.

Declaration

cs-api-definition
public Point GetViewPointFromDocumentPoint(Point point)

Parameters

point

Point

The point.

Returns

Point

Point.

Implements ISyntaxEditorPresenter.GetViewPointFromDocumentPoint(Point)

GetViewPointFromPosition(CaretPosition)

Gets the view point from position.

Declaration

cs-api-definition
public Point GetViewPointFromPosition(CaretPosition position)

Parameters

position

CaretPosition

The position.

Returns

Point

Point.

Implements ISyntaxEditorPresenter.GetViewPointFromPosition(CaretPosition)

HideDropMarker()

Hides the drop marker.

Declaration

cs-api-definition
public void HideDropMarker()

Implements ISyntaxEditorPresenter.HideDropMarker()

InvalidateAndUpdateLayout()

Invalidates the and update layout.

Declaration

cs-api-definition
protected void InvalidateAndUpdateLayout()

InvalidateLayout()

Invalidates the layout.

Declaration

cs-api-definition
protected void InvalidateLayout()

InvalidateLayout(bool)

Invalidates the layout.

Declaration

cs-api-definition
public void InvalidateLayout(bool force)

Parameters

force

bool

MeasureOverride(Size)

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

Declaration

cs-api-definition
protected override Size MeasureOverride(Size constraint)

Parameters

constraint

Size

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

Size

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

MoveCaretToPositionInView(CaretPosition, Point, bool)

Moves the caret to position in view.

Declaration

cs-api-definition
public void MoveCaretToPositionInView(CaretPosition caretPosition, Point positionInView, bool moveToNextIfOutOfBox)

Parameters

caretPosition

CaretPosition

The caret position.

positionInView

Point

The position in view.

moveToNextIfOutOfBox

bool

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

Implements ISyntaxEditorPresenter.MoveCaretToPositionInView(CaretPosition, Point, bool)

MoveDropMarker(CaretPosition)

Moves the drop marker.

Declaration

cs-api-definition
public void MoveDropMarker(CaretPosition position)

Parameters

position

CaretPosition

The position.

Implements ISyntaxEditorPresenter.MoveDropMarker(CaretPosition)

OnGotFocus(RoutedEventArgs)

Invoked whenever an unhandled event reaches this element in its route.

Declaration

cs-api-definition
protected override void OnGotFocus(RoutedEventArgs e)

Parameters

e

RoutedEventArgs

The RoutedEventArgs that contains the event data.

OnMouseLeftButtonDown(MouseButtonEventArgs)

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

Declaration

cs-api-definition
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)

Parameters

e

MouseButtonEventArgs

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

OnMouseLeftButtonUp(MouseButtonEventArgs)

Invoked when an unhandled  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

cs-api-definition
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)

Parameters

e

MouseButtonEventArgs

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

OnMouseMove(MouseEventArgs)

Invoked when an unhandled  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

cs-api-definition
protected override void OnMouseMove(MouseEventArgs e)

Parameters

e

MouseEventArgs

The MouseEventArgs that contains the event data.

OnMouseRightButtonDown(MouseButtonEventArgs)

Invoked when an unhandled  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

cs-api-definition
protected override void OnMouseRightButtonDown(MouseButtonEventArgs e)

Parameters

e

MouseButtonEventArgs

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

OnViewportChanged()

Called when [viewport changed].

Declaration

cs-api-definition
protected virtual void OnViewportChanged()

SetHorizontalOffset(double)

Sets the horizontal offset.

Declaration

cs-api-definition
public void SetHorizontalOffset(double offset)

Parameters

offset

double

The offset.

SetVerticalOffset(double)

Sets the vertical offset.

Declaration

cs-api-definition
public void SetVerticalOffset(double offset)

Parameters

offset

double

The offset.

ShowDropMarker(CaretPosition)

Shows the drop marker.

Declaration

cs-api-definition
public void ShowDropMarker(CaretPosition position)

Parameters

position

CaretPosition

The position.

Implements ISyntaxEditorPresenter.ShowDropMarker(CaretPosition)

UpdateScrollBar(double, double, ScrollBar, ScrollBarVisibility)

Updates the scroll bar.

Declaration

cs-api-definition
protected static void UpdateScrollBar(double viewportSize, double max, ScrollBar scrollBar, ScrollBarVisibility suggestedVisibility)

Parameters

viewportSize

double

Size of the viewport.

max

double

The maximum.

scrollBar

ScrollBar

The scroll bar.

suggestedVisibility

ScrollBarVisibility

The suggested visibility.

Events

ViewportChanged

Occurs when [viewport changed].

Declaration

cs-api-definition
public event EventHandler ViewportChanged

Event Value

EventHandler

Implements ISyntaxEditorPresenter.ViewportChanged