Class SyntaxEditorPresenter
Editing, Scrolling, Layers.
Inheritance
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
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
|
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
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()
Implements
Dispose(Boolean)
Releases unmanaged and - optionally - managed resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
System.Boolean
disposing
|
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
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
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
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
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
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(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 |
Implements
MoveDropMarker(CaretPosition)
Moves the drop marker.
Declaration
public void MoveDropMarker(CaretPosition position)
Parameters
CaretPosition
position
The position. |
Implements
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
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
Explicit Interface Implementations
ISyntaxEditorPresenter.Editor
Gets the editor.
Declaration
RadSyntaxEditor ISyntaxEditorPresenter.Editor { get; }
Returns
RadSyntaxEditor
The editor. |
Implements
ISyntaxEditorPresenter.HorizontalScrollOffset
Gets the horizontal scroll offset.
Declaration
double ISyntaxEditorPresenter.HorizontalScrollOffset { get; }
Returns
System.Double
The horizontal scroll offset. |
Implements
ISyntaxEditorPresenter.VerticalScrollOffset
Gets the vertical scroll offset.
Declaration
double ISyntaxEditorPresenter.VerticalScrollOffset { get; }
Returns
System.Double
The vertical scroll offset. |