Editing, Scrolling, Layers.
Definition
Namespace:Telerik.WinForms.Controls.SyntaxEditor.UI
Assembly:Telerik.WinControls.SyntaxEditor.dll
Syntax:
public class SyntaxEditorPresenter : ContentControl, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode, ISupportDrop, ISyntaxEditorPresenter
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementUIElementFrameworkElementContentControlSyntaxEditorPresenter...
Implements:
Inherited Members
Constructors
Initializes a new instance of the SyntaxEditorPresenter class.
public SyntaxEditorPresenter()
Fields
The drag margin.
protected static readonly double DragMargin
Properties
Gets or sets the caret color.
public Color CaretColor { get; set; }
The caret display mode.
Gets or sets the caret display mode.
public CaretDisplayMode CaretDisplayMode { get; set; }
The caret display mode.
Gets or sets the caret width when the DisplayMode is set to Normal.
public double CaretWidth { 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 RadSyntaxEditorElement Owner { get; set; }
The owner.
Gets or sets the vertical scroll offset.
public double VerticalScrollOffset { get; protected set; }
The vertical scroll offset.
Methods
When overridden in a derived class, positions child elements and determines a size for a FrameworkElement derived class.
Focuses the caret.
public void FocusCaret()
Gets the document point from position.
public Point GetDocumentPointFromPosition(CaretPosition position)
The position.
Returns:Point.
Implements:
Gets the position from view point.
public CaretPosition GetPositionFromViewPoint(Point point)
The position.
Returns:CaretPosition.
Implements:
protected virtual int GetScrollMax(RadScrollBarElement scrollBarElement)
Gets the view point from position.
public Point GetViewPointFromPosition(CaretPosition position)
The position.
Returns:Point.
Implements:
Hides the drop marker.
public void HideDropMarker()
Implements:
Initializes member fields to their default values. This method is called prior the CreateChildItems one and allows for initialization of members on which child elements depend.
protected override void InitializeFields()
Overrides:
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 SizeF MeasureOverride(SizeF availableSize)
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:The size that this element determines it needs during layout, based on its calculations of child element sizes.
Overrides:
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 GotFocus event reaches this element in its route.
protected override void OnGotFocus(EventArgs e)
The RoutedEventArgs that contains the event data.
Overrides:
Invoked when an unhandled MouseLeftButtonDown routed event is raised on this element. Implement this method to add class handling for this event.
protected override void OnMouseDown(MouseEventArgs e)
The that contains the event data. The event data reports that the left mouse button was pressed.
Overrides:
Invoked when an unhandled 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.
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
The that contains the event data. The event data reports that the left mouse button was released.
Overrides:
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.
Overrides:
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 virtual void UpdateScrollBar(double viewportSize, double max, RadScrollBarElement scrollBar, ScrollBarVisibility suggestedVisibility)
Size of the viewport.
maxdoubleThe maximum.
scrollBarRadScrollBarElementThe scroll bar.
suggestedVisibilityScrollBarVisibilityThe suggested visibility.
Events
Occurs when [viewport changed].
public event EventHandler ViewportChanged
Implements: