Class
RadSyntaxEditor

A control for editing source code with syntax highlighting and advanced text editing capabilities.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.SyntaxEditor.dll

Syntax:

cs-api-definition
[TelerikToolboxCategory("Editors")]
[Docking(DockingBehavior.Ask)]
public class RadSyntaxEditor : RadControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider

Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadSyntaxEditor

Implements: IAnalyticsProviderIBindableComponentIComponentIComponentTreeHandlerIDisposableIDropTargetILayoutHandlerINotifyPropertyChangedISupportInitializeISupportInitializeNotificationISynchronizeInvokeIWin32Window

Inherited Members RadControl.isResizing2RadControl.isDisposing2RadControl.invalidResizeRectRadControl.isAccessibilityRequestedRadControl.Dispose(bool)RadControl.Construct()RadControl.CreateRootElement()RadControl.InitializeRootElement(RootRadElement)RadControl.LoadElementTree()RadControl.LoadElementTree(Size)RadControl.SetBackColorThemeOverrides()RadControl.ResetBackColorThemeOverrides()RadControl.SetForeColorThemeOverrides()RadControl.ResetForeColorThemeOverrides()RadControl.OnPreviewKeyDown(PreviewKeyDownEventArgs)RadControl.OnClick(EventArgs)RadControl.OnDoubleClick(EventArgs)RadControl.OnMouseDown(MouseEventArgs)RadControl.OnMouseUp(MouseEventArgs)RadControl.OnMouseEnter(EventArgs)RadControl.OnMouseLeave(EventArgs)RadControl.OnMouseMove(MouseEventArgs)RadControl.OnMouseHover(EventArgs)RadControl.OnMouseWheel(MouseEventArgs)RadControl.OnMouseCaptureChanged(EventArgs)RadControl.OnCreateControl()RadControl.OnHandleDestroyed(EventArgs)RadControl.OnParentChanged(EventArgs)RadControl.OnVisibleChanged(EventArgs)RadControl.OnFontChanged(EventArgs)RadControl.OnForeColorChanged(EventArgs)RadControl.OnBackColorChanged(EventArgs)RadControl.OnEnabledChanged(EventArgs)RadControl.OnBindingContextChanged(EventArgs)RadControl.OnLocationChanged(EventArgs)RadControl.OnPaddingChanged(EventArgs)RadControl.OnRightToLeftChanged(EventArgs)RadControl.OnPaint(PaintEventArgs)RadControl.OnLayout(LayoutEventArgs)RadControl.OnAutoSizeChanged(EventArgs)RadControl.WndProc(ref Message)RadControl.OnInvalidated(RadElement)RadControl.OnCaptureLosing()RadControl.OnToolTipTextNeeded(object, ToolTipTextNeededEventArgs)RadControl.OnScreenTipNeeded(object, ScreenTipNeededEventArgs)RadControl.OnThemeNameChanged(ThemeNameChangedEventArgs)RadControl.ProcessFocusRequested(RadElement)RadControl.ProcessCaptureChangeRequested(RadElement, bool)RadControl.ProcessAutoSizeChanged(bool)RadControl.GetInputElement()RadControl.BeginInit()RadControl.EndInit()RadControl.OnNotifyPropertyChanged(string)RadControl.OnNotifyPropertyChanged(PropertyChangedEventArgs)RadControl.GetPreferredSize(Size)RadControl.SetBoundsCore(int, int, int, int, BoundsSpecified)RadControl.GetRootElementDesiredSize(int, int, int, int)RadControl.OnZoomGesture(ZoomGestureEventArgs)RadControl.OnRotateGesture(RotateGestureEventArgs)RadControl.OnPanGesture(PanGestureEventArgs)RadControl.OnTwoFingerTapGesture(GestureEventArgs)RadControl.OnPressAndTapGesture(PressAndTapGestureEventArgs)RadControl.OnGesture(GestureEventArgs)RadControl.ProcessGesture(Message)RadControl.EnableGesture(GestureType)RadControl.DisableGesture(GestureType)RadControl.Refresh()RadControl.SuspendUpdate()RadControl.ResumeUpdate()RadControl.ResumeUpdate(bool)RadControl.InvokeLayoutCallback(LayoutCallback)RadControl.RegisterHostedControl(RadHostItem)RadControl.UnregisterHostedControl(RadHostItem, bool)RadControl.ResolveStyleGroupForElement(StyleGroup, RadObject)RadControl.GetPlainText()RadControl.ShouldSerializeProperty(RadProperty)RadControl.ShouldSerializeProperty(RadProperty, RadObject)RadControl.ResetProperty(RadProperty, RadObject)RadControl.CanEditElementAtDesignTime(RadElement)RadControl.ProcessCodedUIMessage(ref IPCMessage)RadControl.FindPropertyInChildren(RadControl, IPCMessage)RadControl.PerformRadAutoScale(BoundsSpecified?)RadControl.GetMonitorDpiScaleFactor(Control)RadControl.SetRadAutoScale(bool)RadControl.EnableDpiScalingRadControl.EnableRadAutoScaleRadControl.EnableRadFormInitialDpiScalingRadControl.EnableImageDpiScalingRadControl.EnableSvgImagesRadControl.IsLoadedRadControl.ElementTreeRadControl.UseCompatibleTextRenderingDefaultValueRadControl.BehaviorRadControl.RootElementRadControl.PaddingRadControl.ThemeNameRadControl.TextRadControl.EnableThemingRadControl.ThemeClassNameRadControl.ImageListRadControl.ImageScalingSizeRadControl.UseCompatibleTextRenderingRadControl.AutoSizeRadControl.MaximumSizeRadControl.MinimumSizeRadControl.FocusableRadControl.SiteRadControl.CausesValidationRadControl.IsInitializingRadControl.SmallImageListRadControl.SmallImageScalingSizeRadControl.IsDesignModeRadControl.IsDisplayedRadControl.FocusedElementRadControl.AllowShowFocusCuesRadControl.ShowItemToolTipsRadControl.CommandBindingsRadControl.EnableKeyMapRadControl.BackColorRadControl.ForeColorRadControl.FontRadControl.ValidationCancelRadControl.EnableAnalyticsRadControl.AnalyticsNameRadControl.EnableRadAccessibilityObjectsRadControl.EnableCodedUITestsRadControl.EnableCodedUITestsDefaultValueRadControl.EnableUIAutomationRadControl.EnableUIAutomationDefaultValueRadControl.ElementInvalidatedRadControl.ToolTipTextNeededRadControl.ScreenTipNeededRadControl.ThemeNameChangedRadControl.InitializedRadControl.PropertyChangedRadControl.ZoomGestureRadControl.RotateGestureRadControl.PanGestureRadControl.TwoFingerTapGestureRadControl.PressAndTapGestureScrollableControl.ScrollStateAutoScrollingScrollableControl.ScrollStateHScrollVisibleScrollableControl.ScrollStateVScrollVisibleScrollableControl.ScrollStateUserHasScrolledScrollableControl.ScrollStateFullDragScrollableControl.AdjustFormScrollbars(bool)ScrollableControl.GetScrollState(int)ScrollableControl.OnPaintBackground(PaintEventArgs)ScrollableControl.SetDisplayRectLocation(int, int)ScrollableControl.ScrollControlIntoView(Control)ScrollableControl.ScrollToControl(Control)ScrollableControl.OnScroll(ScrollEventArgs)ScrollableControl.SetAutoScrollMargin(int, int)ScrollableControl.SetScrollState(int, bool)ScrollableControl.AutoScrollScrollableControl.AutoScrollMarginScrollableControl.AutoScrollPositionScrollableControl.AutoScrollMinSizeScrollableControl.CreateParamsScrollableControl.DisplayRectangleScrollableControl.HScrollScrollableControl.HorizontalScrollScrollableControl.VScrollScrollableControl.VerticalScrollScrollableControl.ScrollControl.GetAccessibilityObjectById(int)Control.SetAutoSizeMode(AutoSizeMode)Control.GetAutoSizeMode()Control.AccessibilityNotifyClients(AccessibleEvents, int)Control.AccessibilityNotifyClients(AccessibleEvents, int, int)Control.BeginInvoke(Delegate)Control.BeginInvoke(Delegate, params object[])Control.BringToFront()Control.Contains(Control)Control.CreateControlsInstance()Control.CreateGraphics()Control.CreateHandle()Control.CreateControl()Control.DefWndProc(ref Message)Control.DestroyHandle()Control.DoDragDrop(object, DragDropEffects)Control.DrawToBitmap(Bitmap, Rectangle)Control.EndInvoke(IAsyncResult)Control.FindForm()Control.GetTopLevel()Control.RaiseKeyEvent(object, KeyEventArgs)Control.RaiseMouseEvent(object, MouseEventArgs)Control.Focus()Control.FromChildHandle(IntPtr)Control.FromHandle(IntPtr)Control.GetChildAtPoint(Point, GetChildAtPointSkip)Control.GetChildAtPoint(Point)Control.GetContainerControl()Control.GetScaledBounds(Rectangle, SizeF, BoundsSpecified)Control.GetNextControl(Control, bool)Control.GetStyle(ControlStyles)Control.Hide()Control.InitLayout()Control.Invalidate(Region)Control.Invalidate(Region, bool)Control.Invalidate()Control.Invalidate(bool)Control.Invalidate(Rectangle)Control.Invalidate(Rectangle, bool)Control.Invoke(Delegate)Control.Invoke(Delegate, params object[])Control.InvokePaint(Control, PaintEventArgs)Control.InvokePaintBackground(Control, PaintEventArgs)Control.IsKeyLocked(Keys)Control.IsInputChar(char)Control.IsMnemonic(char, string)Control.LogicalToDeviceUnits(int)Control.LogicalToDeviceUnits(Size)Control.ScaleBitmapLogicalToDevice(ref Bitmap)Control.NotifyInvalidate(Rectangle)Control.InvokeOnClick(Control, EventArgs)Control.OnBackgroundImageChanged(EventArgs)Control.OnBackgroundImageLayoutChanged(EventArgs)Control.OnCausesValidationChanged(EventArgs)Control.OnContextMenuChanged(EventArgs)Control.OnContextMenuStripChanged(EventArgs)Control.OnCursorChanged(EventArgs)Control.OnDockChanged(EventArgs)Control.OnNotifyMessage(Message)Control.OnParentBackColorChanged(EventArgs)Control.OnParentBackgroundImageChanged(EventArgs)Control.OnParentBindingContextChanged(EventArgs)Control.OnParentCursorChanged(EventArgs)Control.OnParentEnabledChanged(EventArgs)Control.OnParentFontChanged(EventArgs)Control.OnParentForeColorChanged(EventArgs)Control.OnParentRightToLeftChanged(EventArgs)Control.OnParentVisibleChanged(EventArgs)Control.OnPrint(PaintEventArgs)Control.OnTabIndexChanged(EventArgs)Control.OnTabStopChanged(EventArgs)Control.OnTextChanged(EventArgs)Control.OnClientSizeChanged(EventArgs)Control.OnControlAdded(ControlEventArgs)Control.OnControlRemoved(ControlEventArgs)Control.OnHandleCreated(EventArgs)Control.OnDragEnter(DragEventArgs)Control.OnDragOver(DragEventArgs)Control.OnDragLeave(EventArgs)Control.OnDragDrop(DragEventArgs)Control.OnGiveFeedback(GiveFeedbackEventArgs)Control.OnEnter(EventArgs)Control.InvokeGotFocus(Control, EventArgs)Control.OnHelpRequested(HelpEventArgs)Control.OnInvalidated(InvalidateEventArgs)Control.OnLeave(EventArgs)Control.InvokeLostFocus(Control, EventArgs)Control.OnMarginChanged(EventArgs)Control.OnMouseDoubleClick(MouseEventArgs)Control.OnMouseClick(MouseEventArgs)Control.OnDpiChangedBeforeParent(EventArgs)Control.OnDpiChangedAfterParent(EventArgs)Control.OnMove(EventArgs)Control.OnQueryContinueDrag(QueryContinueDragEventArgs)Control.OnRegionChanged(EventArgs)Control.OnResize(EventArgs)Control.OnSizeChanged(EventArgs)Control.OnChangeUICues(UICuesEventArgs)Control.OnStyleChanged(EventArgs)Control.OnSystemColorsChanged(EventArgs)Control.OnValidating(CancelEventArgs)Control.OnValidated(EventArgs)Control.RescaleConstantsForDpi(int, int)Control.PerformLayout()Control.PerformLayout(Control, string)Control.PointToClient(Point)Control.PointToScreen(Point)Control.PreProcessMessage(ref Message)Control.PreProcessControlMessage(ref Message)Control.ProcessCmdKey(ref Message, Keys)Control.ProcessDialogKey(Keys)Control.ProcessKeyEventArgs(ref Message)Control.ProcessKeyMessage(ref Message)Control.ProcessKeyPreview(ref Message)Control.RaiseDragEvent(object, DragEventArgs)Control.RaisePaintEvent(object, PaintEventArgs)Control.RecreateHandle()Control.RectangleToClient(Rectangle)Control.RectangleToScreen(Rectangle)Control.ReflectMessage(IntPtr, ref Message)Control.ResetMouseEventArgs()Control.ResetText()Control.ResumeLayout()Control.ResumeLayout(bool)Control.Scale(SizeF)Control.Select()Control.Select(bool, bool)Control.SelectNextControl(Control, bool, bool, bool, bool)Control.SendToBack()Control.SetBounds(int, int, int, int)Control.SetBounds(int, int, int, int, BoundsSpecified)Control.SetClientSizeCore(int, int)Control.SizeFromClientSize(Size)Control.SetStyle(ControlStyles, bool)Control.SetTopLevel(bool)Control.SetVisibleCore(bool)Control.RtlTranslateAlignment(HorizontalAlignment)Control.RtlTranslateAlignment(LeftRightAlignment)Control.RtlTranslateAlignment(ContentAlignment)Control.RtlTranslateHorizontal(HorizontalAlignment)Control.RtlTranslateLeftRight(LeftRightAlignment)Control.RtlTranslateContent(ContentAlignment)Control.Show()Control.SuspendLayout()Control.Update()Control.UpdateBounds()Control.UpdateBounds(int, int, int, int)Control.UpdateBounds(int, int, int, int, int, int)Control.UpdateZOrder()Control.UpdateStyles()Control.OnImeModeChanged(EventArgs)Control.AccessibilityObjectControl.AccessibleDefaultActionDescriptionControl.AccessibleDescriptionControl.AccessibleNameControl.AccessibleRoleControl.AllowDropControl.AnchorControl.AutoScrollOffsetControl.LayoutEngineControl.BackgroundImageControl.BackgroundImageLayoutControl.BindingContextControl.BottomControl.BoundsControl.CanFocusControl.CanRaiseEventsControl.CanSelectControl.CaptureControl.CheckForIllegalCrossThreadCallsControl.ClientRectangleControl.ClientSizeControl.CompanyNameControl.ContainsFocusControl.ContextMenuControl.ContextMenuStripControl.ControlsControl.CreatedControl.CursorControl.DataBindingsControl.DefaultBackColorControl.DefaultCursorControl.DefaultFontControl.DefaultForeColorControl.DefaultMarginControl.DefaultMaximumSizeControl.DefaultMinimumSizeControl.DefaultPaddingControl.DeviceDpiControl.IsDisposedControl.DisposingControl.DockControl.DoubleBufferedControl.EnabledControl.FocusedControl.FontHeightControl.HandleControl.HasChildrenControl.HeightControl.IsHandleCreatedControl.InvokeRequiredControl.IsAccessibleControl.IsMirroredControl.LeftControl.LocationControl.MarginControl.ModifierKeysControl.MouseButtonsControl.MousePositionControl.NameControl.ParentControl.ProductNameControl.ProductVersionControl.RecreatingHandleControl.RegionControl.RenderRightToLeftControl.ResizeRedrawControl.RightControl.RightToLeftControl.ScaleChildrenControl.SizeControl.TabIndexControl.TabStopControl.TagControl.TopControl.TopLevelControlControl.ShowKeyboardCuesControl.ShowFocusCuesControl.UseWaitCursorControl.VisibleControl.WidthControl.PreferredSizeControl.CanEnableImeControl.DefaultImeModeControl.ImeModeControl.ImeModeBaseControl.PropagatingImeModeControl.BackColorChangedControl.BackgroundImageChangedControl.BackgroundImageLayoutChangedControl.BindingContextChangedControl.CausesValidationChangedControl.ClientSizeChangedControl.ContextMenuChangedControl.ContextMenuStripChangedControl.CursorChangedControl.DockChangedControl.EnabledChangedControl.FontChangedControl.ForeColorChangedControl.LocationChangedControl.MarginChangedControl.RegionChangedControl.RightToLeftChangedControl.SizeChangedControl.TabIndexChangedControl.TabStopChangedControl.TextChangedControl.VisibleChangedControl.ClickControl.ControlAddedControl.ControlRemovedControl.DragDropControl.DragEnterControl.DragOverControl.DragLeaveControl.GiveFeedbackControl.HandleCreatedControl.HandleDestroyedControl.HelpRequestedControl.InvalidatedControl.PaddingChangedControl.PaintControl.QueryContinueDragControl.QueryAccessibilityHelpControl.DoubleClickControl.EnterControl.GotFocusControl.KeyDownControl.KeyPressControl.KeyUpControl.LayoutControl.LeaveControl.LostFocusControl.MouseClickControl.MouseDoubleClickControl.MouseCaptureChangedControl.MouseDownControl.MouseEnterControl.MouseLeaveControl.DpiChangedBeforeParentControl.DpiChangedAfterParentControl.MouseHoverControl.MouseMoveControl.MouseUpControl.MouseWheelControl.MoveControl.PreviewKeyDownControl.ResizeControl.ChangeUICuesControl.StyleChangedControl.SystemColorsChangedControl.ValidatingControl.ValidatedControl.ParentChangedControl.ImeModeChangedComponent.Dispose()Component.GetService(Type)Component.ToString()Component.EventsComponent.ContainerComponent.DesignModeComponent.DisposedMarshalByRefObject.MemberwiseClone(bool)MarshalByRefObject.GetLifetimeService()MarshalByRefObject.InitializeLifetimeService()MarshalByRefObject.CreateObjRef(Type)

Constructors

RadSyntaxEditor()

Declaration

cs-api-definition
public RadSyntaxEditor()

Properties

AllowScaling

Gets or sets a value indicating whether text scaling is allowed in the editor.

Declaration

cs-api-definition
[Browsable(true)]
public bool AllowScaling { get; set; }

Property Value

bool

CaretColor

Gets or sets the color of the text cursor (caret) in the editor.

Declaration

cs-api-definition
[Browsable(true)]
public Color CaretColor { get; set; }

Property Value

Color

CaretDisplayMode

Gets or sets the display mode of the text cursor (caret), determining its appearance in the editor.

Declaration

cs-api-definition
[Browsable(true)]
public CaretDisplayMode CaretDisplayMode { get; set; }

Property Value

CaretDisplayMode

CaretWidth

Gets or sets the width of the text cursor (caret) when the CaretDisplayMode is set to Normal.

Declaration

cs-api-definition
[Browsable(true)]
public double CaretWidth { get; set; }

Property Value

double

Commands

Gets the collection of commands that can be executed in the syntax editor.

Declaration

cs-api-definition
[Browsable(false)]
public SyntaxEditorCommands Commands { get; }

Property Value

SyntaxEditorCommands

DefaultSize

Gets the default size of the control when it is initially placed on a design surface.

Declaration

cs-api-definition
protected override Size DefaultSize { get; }

Property Value

Size

A Size object representing the default size of the control.

Overrides Control.DefaultSize

Dispatcher

Gets the dispatcher object that manages the execution of operations on the UI thread.

Declaration

cs-api-definition
[Browsable(false)]
public Dispatcher Dispatcher { get; }

Property Value

Dispatcher

Document

Gets or sets the text document that contains the content displayed and edited in the control.

Declaration

cs-api-definition
[Browsable(false)]
public TextDocument Document { get; set; }

Property Value

TextDocument

EditorFontSize

Gets or sets the font size of the text displayed in the editor.

Declaration

cs-api-definition
[Browsable(true)]
public double EditorFontSize { get; set; }

Property Value

double

InputHandler

Gets or sets the component which is responsible for handling the keyboard and mouse input of the RadSyntaxEditor.

Declaration

cs-api-definition
public SyntaxEditorInputBehavior InputHandler { get; set; }

Property Value

SyntaxEditorInputBehavior

IsCaretVisible

Gets or sets a value indicating whether the text cursor (caret) is visible in the editor.

Declaration

cs-api-definition
[Browsable(true)]
public bool IsCaretVisible { get; set; }

Property Value

bool

IsSelectionEnabled

Gets or sets a value indicating whether text selection is enabled in the editor.

Declaration

cs-api-definition
[Browsable(true)]
public bool IsSelectionEnabled { get; set; }

Property Value

bool

IsWordWrapEnabled

Gets or sets a value indicating whether word wrapping is enabled in the editor.

Declaration

cs-api-definition
[Browsable(true)]
public bool IsWordWrapEnabled { get; set; }

Property Value

bool

Palette

Gets or sets the color palette that defines the appearance of syntax elements in the editor.

Declaration

cs-api-definition
[Browsable(false)]
public SyntaxEditorPalette Palette { get; set; }

Property Value

SyntaxEditorPalette

ScaleFactor

Gets or sets the scale factor that determines the size of text and UI elements in the editor.

Declaration

cs-api-definition
[Browsable(true)]
public double ScaleFactor { get; set; }

Property Value

double

ShouldTaggersProcessEntireLines

Gets or sets a value indicating whether the entire line should be processed by the syntax taggers instead of just the modified region.

Declaration

cs-api-definition
[Browsable(true)]
public bool ShouldTaggersProcessEntireLines { get; set; }

Property Value

bool

ShowLineNumbers

Gets or sets a value indicating whether the line numbers are shown.

Declaration

cs-api-definition
[Browsable(true)]
public bool ShowLineNumbers { get; set; }

Property Value

bool

true if the line numbers are shown; otherwise, false.

SyntaxEditorElement

Gets the RadSyntaxEditorElement which is the main element in the control.

Declaration

cs-api-definition
[Browsable(false)]
public RadSyntaxEditorElement SyntaxEditorElement { get; }

Property Value

RadSyntaxEditorElement

TaggersRegistry

Gets the registry of taggers that provide syntax highlighting and other text analysis features.

Declaration

cs-api-definition
[Browsable(false)]
public TaggersRegistry TaggersRegistry { get; }

Property Value

TaggersRegistry

TextFormatDefinitions

Gets the stack of text format definitions that determine how different elements of text are displayed.

Declaration

cs-api-definition
[Browsable(false)]
public TextFormatDefinitionStack TextFormatDefinitions { get; }

Property Value

TextFormatDefinitionStack

UseShiftKeyInSelection

Gets or sets a value indicating whether the Shift key must be used to extend text selection.

Declaration

cs-api-definition
[Browsable(true)]
public bool UseShiftKeyInSelection { get; set; }

Property Value

bool

Methods

Copy()

Copies the current text selection to the clipboard.

Declaration

cs-api-definition
public void Copy()

CreateAccessibilityInstance()

Creates the accessibility object for this control to support screen readers and other assistive technologies.

Declaration

cs-api-definition
protected override AccessibleObject CreateAccessibilityInstance()

Returns

AccessibleObject

An AccessibleObject that represents the control for accessibility purposes.

Overrides Control.CreateAccessibilityInstance()

CreateBehavior()

Creates the input behavior component for the RadSyntaxEditor.

Declaration

cs-api-definition
protected override ComponentInputBehavior CreateBehavior()

Returns

ComponentInputBehavior

A new instance of RadSyntaxEditorComponentInputBehavior for handling input in this control.

Overrides RadControl.CreateBehavior()

CreateChildItems(RadElement)

Creates the child elements of the RadSyntaxEditor control.

Declaration

cs-api-definition
protected override void CreateChildItems(RadElement parent)

Parameters

parent

RadElement

The parent element to which child elements will be added.

Overrides RadControl.CreateChildItems(RadElement)

GetPointFromPosition(CaretPosition)

Converts a text caret position to a point in the editor's coordinate system.

Declaration

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

Parameters

position

CaretPosition

The caret position to convert.

Returns

Point

A Point representing the visual position of the caret.

GetPositionFromControlPoint(Point)

Converts a point in the control's coordinate system to a text caret position.

Declaration

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

Parameters

point

Point

The point relative to the control's top-left corner.

Returns

CaretPosition

A CaretPosition representing the text position at the specified point.

IsInputKey(Keys)

Determines whether a key should be processed as an input key or passed to the parent control.

Declaration

cs-api-definition
protected override bool IsInputKey(Keys keyData)

Parameters

keyData

Keys

The key to check.

Returns

bool

true if the specified key should be processed by the control; otherwise, false.

Overrides RadControl.IsInputKey(Keys)

MoveCurrentLineToTop()

Scrolls the editor to position the current line at the top of the viewport.

Declaration

cs-api-definition
public void MoveCurrentLineToTop()

OnGotFocus(EventArgs)

Handles the event that occurs when the control gets focus, showing the text cursor and focusing the editor element.

Declaration

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

Parameters

e

EventArgs

An EventArgs object containing event data.

Overrides RadControl.OnGotFocus(EventArgs)

OnKeyDown(KeyEventArgs)

Handles the key down event by delegating it to the input handler.

Declaration

cs-api-definition
protected override void OnKeyDown(KeyEventArgs e)

Parameters

e

KeyEventArgs

The event data containing information about the key.

Overrides RadControl.OnKeyDown(KeyEventArgs)

OnKeyPress(KeyPressEventArgs)

Handles the key press event by delegating it to the input handler.

Declaration

cs-api-definition
protected override void OnKeyPress(KeyPressEventArgs e)

Parameters

e

KeyPressEventArgs

The event data containing information about the pressed key.

Overrides RadControl.OnKeyPress(KeyPressEventArgs)

OnKeyUp(KeyEventArgs)

Handles the key up event by delegating it to the input handler.

Declaration

cs-api-definition
protected override void OnKeyUp(KeyEventArgs e)

Parameters

e

KeyEventArgs

The event data containing information about the released key.

Overrides RadControl.OnKeyUp(KeyEventArgs)

OnLoad(Size)

Called when the control is loaded to initialize the editor element.

Declaration

cs-api-definition
protected override void OnLoad(Size desiredSize)

Parameters

desiredSize

Size

The desired size of the control.

Overrides RadControl.OnLoad(Size)

OnLostFocus(EventArgs)

Handles the event that occurs when the control loses focus, hiding the text cursor.

Declaration

cs-api-definition
protected override void OnLostFocus(EventArgs e)

Parameters

e

EventArgs

An EventArgs object containing event data.

Overrides RadControl.OnLostFocus(EventArgs)

OnThemeChanged()

Called when the control's theme changes to update visual elements accordingly.

Declaration

cs-api-definition
protected override void OnThemeChanged()

Overrides RadControl.OnThemeChanged()

PageDown()

Scrolls the editor content down by one page (viewport height).

Declaration

cs-api-definition
public void PageDown()

PageUp()

Scrolls the editor content up by one page (viewport height).

Declaration

cs-api-definition
public void PageUp()

ProcessDialogChar(char)

Processes a dialog character, allowing Alt key combinations to be handled by dialogs.

Declaration

cs-api-definition
protected override bool ProcessDialogChar(char charCode)

Parameters

charCode

char

The character to process.

Returns

bool

true if the character was processed; otherwise, false.

Overrides Control.ProcessDialogChar(char)

ProcessMnemonic(char)

Processes a mnemonic character, which the editor does not support.

Declaration

cs-api-definition
protected override bool ProcessMnemonic(char charCode)

Parameters

charCode

char

The character to process.

Returns

bool

Always false as the editor does not handle mnemonics.

Overrides RadControl.ProcessMnemonic(char)

ScaleControl(SizeF, BoundsSpecified)

Scales the control and its child elements according to the specified scaling factor.

Declaration

cs-api-definition
protected override void ScaleControl(SizeF factor, BoundsSpecified specified)

Parameters

factor

SizeF

The scaling factor to apply.

specified

BoundsSpecified

A value indicating which bounds of the control to scale.

Overrides RadControl.ScaleControl(SizeF, BoundsSpecified)

SelectAll()

Selects all text in the editor.

Declaration

cs-api-definition
public void SelectAll()

UpdateSelection()

Refreshes the visual representation of the current text selection in the editor.

Declaration

cs-api-definition
public void UpdateSelection()

ZoomIn()

Increases the zoom level (scale factor) of the editor by one step.

Declaration

cs-api-definition
public void ZoomIn()

ZoomOut()

Decreases the zoom level (scale factor) of the editor by one step.

Declaration

cs-api-definition
public void ZoomOut()

ZoomTo(double)

Sets the editor to a specific zoom level (scale factor). The minimum supported zoom level is 0.2 and the maximum supported is 4.

Declaration

cs-api-definition
public void ZoomTo(double zoomLevel)

Parameters

zoomLevel

double

The scale factor to be applied to the editor content.

Exceptions

ArgumentOutOfRangeException

Thrown when the zoomLevel parameter is negative.

Events

CommandError

Occurs when a command execution results in an error.

Declaration

cs-api-definition
public event EventHandler<CommandErrorEventArgs> CommandError

Event Value

EventHandler<CommandErrorEventArgs>

CommandExecuted

Occurs after a command has been successfully executed.

Declaration

cs-api-definition
public event EventHandler<CommandExecutedEventArgs> CommandExecuted

Event Value

EventHandler<CommandExecutedEventArgs>

CommandExecuting

Occurs before a command is executed, allowing you to cancel or modify the command execution.

Declaration

cs-api-definition
public event EventHandler<CommandExecutingEventArgs> CommandExecuting

Event Value

EventHandler<CommandExecutingEventArgs>

DocumentChanged

Occurs after the document has been changed, such as when a new document is loaded or created.

Declaration

cs-api-definition
public event EventHandler DocumentChanged

Event Value

EventHandler

DocumentChanging

Occurs before the document is changed, allowing you to perform actions before a new document is loaded.

Declaration

cs-api-definition
public event EventHandler DocumentChanging

Event Value

EventHandler

DocumentContentChanged

Occurs after the text content of the document has been modified, providing information about the changes made.

Declaration

cs-api-definition
public event EventHandler<TextContentChangedEventArgs> DocumentContentChanged

Event Value

EventHandler<TextContentChangedEventArgs>

DocumentContentChanging

Occurs before the text content of the document is modified, allowing you to cancel or modify the changes.

Declaration

cs-api-definition
public event EventHandler<TextContentChangingEventArgs> DocumentContentChanging

Event Value

EventHandler<TextContentChangingEventArgs>

IsReadOnlyChanged

Occurs when the read-only state of the editor changes.

Declaration

cs-api-definition
public event EventHandler IsReadOnlyChanged

Event Value

EventHandler

LayoutPropertiesChanged

Occurs when the layout properties of the editor change, affecting how text is displayed.

Declaration

cs-api-definition
public event EventHandler LayoutPropertiesChanged

Event Value

EventHandler

PreviewSyntaxEditorInput

Occurs before text input is processed by the syntax editor, allowing you to intercept and modify the input.

Declaration

cs-api-definition
public event EventHandler<PreviewSyntaxEditorInputEventArgs> PreviewSyntaxEditorInput

Event Value

EventHandler<PreviewSyntaxEditorInputEventArgs>

PreviewSyntaxEditorKeyDown

Occurs before a key down event is processed by the syntax editor, allowing you to intercept and handle keyboard input.

Declaration

cs-api-definition
public event EventHandler<PreviewSyntaxEditorKeyEventArgs> PreviewSyntaxEditorKeyDown

Event Value

EventHandler<PreviewSyntaxEditorKeyEventArgs>

PreviewSyntaxEditorKeyUp

Occurs before a key up event is processed by the syntax editor, allowing you to intercept and handle keyboard input.

Declaration

cs-api-definition
public event EventHandler<PreviewSyntaxEditorKeyEventArgs> PreviewSyntaxEditorKeyUp

Event Value

EventHandler<PreviewSyntaxEditorKeyEventArgs>

PreviewSyntaxEditorMouseLeftButtonDown

Occurs before a mouse left button down event is processed by the syntax editor, allowing you to intercept and handle mouse input.

Declaration

cs-api-definition
public event EventHandler<PreviewSyntaxEditorMouseButtonEventArgs> PreviewSyntaxEditorMouseLeftButtonDown

Event Value

EventHandler<PreviewSyntaxEditorMouseButtonEventArgs>

PreviewSyntaxEditorMouseRightButtonDown

Occurs before a mouse right button down event is processed by the syntax editor, allowing you to intercept and handle context menu actions.

Declaration

cs-api-definition
public event EventHandler<PreviewSyntaxEditorMouseButtonEventArgs> PreviewSyntaxEditorMouseRightButtonDown

Event Value

EventHandler<PreviewSyntaxEditorMouseButtonEventArgs>

ScaleFactorChanged

Occurs when the scaling factor of the editor changes, affecting the size of text and UI elements.

Declaration

cs-api-definition
public event EventHandler ScaleFactorChanged

Event Value

EventHandler

SelectionChanged

Occurs when the text selection in the editor changes, either by user interaction or programmatically.

Declaration

cs-api-definition
public event EventHandler SelectionChanged

Event Value

EventHandler

ViewportChanged

Occurs when the visible area (viewport) of the editor changes, such as during scrolling or resizing.

Declaration

cs-api-definition
public event EventHandler ViewportChanged

Event Value

EventHandler