ClassSyntaxEditorPresenter
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
SyntaxEditorPresenter()
Initializes a new instance of the SyntaxEditorPresenter class.
Declaration
public SyntaxEditorPresenter()
Fields
DragMargin
The drag margin.
MaxSize
The maximum size constant.
Declaration
public static readonly Size MaxSize
Field Value
Size
Properties
Caret
Gets the caret.
CaretDisplayMode
Gets or sets the caret display mode.
Declaration
public CaretDisplayMode CaretDisplayMode { get; set; }
Property Value
The caret display mode.
HorizontalScrollOffset
Gets or sets the horizontal scroll offset.
Declaration
public double HorizontalScrollOffset { get; protected set; }
Property Value
The horizontal scroll offset.
IsPresenterFocused
Gets a value indicating whether this instance is presenter focused.
Declaration
public bool IsPresenterFocused { get; }
Property Value
true if this instance is presenter focused; otherwise, false.
Owner
Gets or sets the owner.
Declaration
public RadSyntaxEditor Owner { get; set; }
Property Value
The owner.
VerticalScrollOffset
Gets or sets the vertical scroll offset.
Declaration
public double VerticalScrollOffset { get; protected set; }
Property Value
The vertical scroll offset.
Viewport
Gets the viewport.
Declaration
public Rect Viewport { get; }
Property Value
Rect
The viewport.
Implements
Methods
ArrangeOverride(Size)
When overridden in a derived class, positions child elements and determines a size for a FrameworkElement derived class.
Declaration
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
public void Dispose()
Implements
Dispose(bool)
Releases unmanaged and - optionally - managed resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources.
GetDocumentPointFromPosition(CaretPosition)
Gets the document point from position.
Declaration
public Point GetDocumentPointFromPosition(CaretPosition position)
Parameters
position
The position.
Returns
Point
Point.
Implements
GetDocumentPointFromViewPoint(Point)
Gets the document point from view point.
Declaration
public Point GetDocumentPointFromViewPoint(Point point)
Parameters
point
Point
The point.
Returns
Point
Point.
Implements
GetPositionFromViewPoint(Point)
Gets the position from view point.
Declaration
public CaretPosition GetPositionFromViewPoint(Point point)
Parameters
point
Point
The position.
Returns
CaretPosition.
Implements
GetViewPointFromDocumentPoint(Point)
Gets the view point from document point.
Declaration
public Point GetViewPointFromDocumentPoint(Point point)
Parameters
point
Point
The point.
Returns
Point
Point.
Implements
GetViewPointFromPosition(CaretPosition)
Gets the view point from position.
Declaration
public Point GetViewPointFromPosition(CaretPosition position)
Parameters
position
The position.
Returns
Point
Point.
Implements
HideDropMarker()
Hides the drop marker.
Declaration
public void HideDropMarker()
Implements
InvalidateAndUpdateLayout()
Invalidates the and update layout.
Declaration
protected void InvalidateAndUpdateLayout()
InvalidateLayout()
Invalidates the layout.
Declaration
protected void InvalidateLayout()
InvalidateLayout(bool)
Invalidates the layout.
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
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
public void MoveCaretToPositionInView(CaretPosition caretPosition, Point positionInView, bool moveToNextIfOutOfBox)
Parameters
caretPosition
The caret position.
positionInView
Point
The position in view.
moveToNextIfOutOfBox
If set to true [move to next if out of box].
Implements
MoveDropMarker(CaretPosition)
Moves the drop marker.
Declaration
public void MoveDropMarker(CaretPosition position)
Parameters
position
The position.
Implements
OnGotFocus(RoutedEventArgs)
Invoked whenever an unhandled event reaches this element in its route.
Declaration
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
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
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
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
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
protected virtual void OnViewportChanged()
SetHorizontalOffset(double)
Sets the horizontal offset.
Declaration
public void SetHorizontalOffset(double offset)
Parameters
offset
The offset.
SetVerticalOffset(double)
Sets the vertical offset.
Declaration
public void SetVerticalOffset(double offset)
Parameters
offset
The offset.
ShowDropMarker(CaretPosition)
Shows the drop marker.
Declaration
public void ShowDropMarker(CaretPosition position)
Parameters
position
The position.
Implements
UpdateScrollBar(double, double, ScrollBar, ScrollBarVisibility)
Updates the scroll bar.
Declaration
protected static void UpdateScrollBar(double viewportSize, double max, ScrollBar scrollBar, ScrollBarVisibility suggestedVisibility)
Parameters
viewportSize
Size of the viewport.
max
The maximum.
scrollBar
ScrollBar
The scroll bar.
suggestedVisibility
ScrollBarVisibility
The suggested visibility.
Events
ViewportChanged
Occurs when [viewport changed].
Declaration
public event EventHandler ViewportChanged
Event Value
Implements