Editing, Scrolling, Layers.
Definition
Namespace:Telerik.Windows.Controls.SyntaxEditor.UI
Assembly:Telerik.Windows.Controls.SyntaxEditor.dll
Syntax:
public class SyntaxEditorPresenter : ContentControl, ISyntaxEditorPresenter, IDisposable
Inheritance: objectSyntaxEditorPresenter
Implements:
Constructors
Initializes a new instance of the SyntaxEditorPresenter class.
public SyntaxEditorPresenter()
Fields
The drag margin.
protected static readonly double DragMargin
MaxSize
Size
The maximum size constant.
public static readonly Size MaxSize
Properties
Gets or sets the caret display mode.
public CaretDisplayMode CaretDisplayMode { get; set; }
The caret display mode.
Gets or sets the horizontal scroll offset.
public double HorizontalScrollOffset { get; protected set; }
The horizontal scroll offset.
Gets a value indicating whether this instance is presenter focused.
public bool IsPresenterFocused { get; }
true if this instance is presenter focused; otherwise, false.
Gets or sets the owner.
public RadSyntaxEditor Owner { get; set; }
The owner.
Gets or sets the vertical scroll offset.
public double VerticalScrollOffset { get; protected set; }
The vertical scroll offset.
Viewport
Rect
Gets the viewport.
public Rect Viewport { get; }
The viewport.
Implements:
Methods
When overridden in a derived class, positions child elements and determines a size for a FrameworkElement derived class.
protected override Size ArrangeOverride(Size arrangeBounds)
The final area within the parent that this element should use to arrange itself and its children.
Returns:Size
The actual size used.
Called when instance is disposed.
public void Dispose()
Implements:
Releases unmanaged and - optionally - managed resources.
protected virtual void Dispose(bool disposing)
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Focuses the caret.
public void FocusCaret()
Gets the document point from position.
public Point GetDocumentPointFromPosition(CaretPosition position)
The position.
Returns:Point
Point.
Implements:
Gets the document point from view point.
public Point GetDocumentPointFromViewPoint(Point point)
The point.
Returns:Point
Point.
Implements:
Gets the position from view point.
public CaretPosition GetPositionFromViewPoint(Point point)
The position.
Returns:CaretPosition.
Implements:
Gets the view point from document point.
public Point GetViewPointFromDocumentPoint(Point point)
The point.
Returns:Point
Point.
Implements:
Gets the view point from position.
public Point GetViewPointFromPosition(CaretPosition position)
The position.
Returns:Point
Point.
Implements:
Hides the drop marker.
public void HideDropMarker()
Implements:
Invalidates the and update layout.
protected void InvalidateAndUpdateLayout()
Invalidates the layout.
protected void InvalidateLayout()
Invalidates the layout.
When overridden in a derived class, measures the size in layout required for child elements and determines a size for the FrameworkElement-derived class.
protected override Size MeasureOverride(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:Size
The size that this element determines it needs during layout, based on its calculations of child element sizes.
Moves the caret to position in view.
public void MoveCaretToPositionInView(CaretPosition caretPosition, Point positionInView, bool moveToNextIfOutOfBox)
The caret position.
positionInViewPointThe position in view.
moveToNextIfOutOfBoxboolIf set to true [move to next if out of box].
Implements:
Moves the drop marker.
public void MoveDropMarker(CaretPosition position)
The position.
Implements:
Invoked whenever an unhandled event reaches this element in its route.
protected override void OnGotFocus(RoutedEventArgs e)
The RoutedEventArgs that contains the event data.
Invoked when an unhandled routed event is raised on this element. Implement this method to add class handling for this event.
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
The MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was pressed.
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.
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
The MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was released.
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.
protected override void OnMouseMove(MouseEventArgs e)
The MouseEventArgs that contains the event data.
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.
protected override void OnMouseRightButtonDown(MouseButtonEventArgs e)
The MouseButtonEventArgs that contains the event data. The event data reports that the right mouse button was pressed.
Called when [viewport changed].
protected virtual void OnViewportChanged()
Sets the horizontal offset.
Sets the vertical offset.
Shows the drop marker.
public void ShowDropMarker(CaretPosition position)
The position.
Implements:
Updates the scroll bar.
protected static void UpdateScrollBar(double viewportSize, double max, ScrollBar scrollBar, ScrollBarVisibility suggestedVisibility)
Size of the viewport.
maxdoubleThe maximum.
scrollBarScrollBarThe scroll bar.
suggestedVisibilityScrollBarVisibilityThe suggested visibility.
Events
Occurs when [viewport changed].
public event EventHandler ViewportChanged
Implements: