New to Telerik UI for WinFormsStart a free 30-day trial

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:

C#
[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

C#
public RadSyntaxEditor()

Properties

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

C#
[Browsable(true)]
public bool AllowScaling { get; set; }

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

C#
[Browsable(true)]
public Color CaretColor { get; set; }

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

C#
[Browsable(true)]
public CaretDisplayMode CaretDisplayMode { get; set; }

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

C#
[Browsable(true)]
public double CaretWidth { get; set; }

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

C#
[Browsable(false)]
public SyntaxEditorCommands Commands { get; }

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

C#
protected override Size DefaultSize { get; }
Property Value:

A Size object representing the default size of the control.

Overrides: Control.DefaultSize

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

C#
[Browsable(false)]
public Dispatcher Dispatcher { get; }

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

C#
[Browsable(false)]
public TextDocument Document { get; set; }

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

C#
[Browsable(true)]
public double EditorFontSize { get; set; }

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

C#
public SyntaxEditorInputBehavior InputHandler { get; set; }

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

C#
[Browsable(true)]
public bool IsCaretVisible { get; set; }

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

C#
[Browsable(true)]
public bool IsSelectionEnabled { get; set; }

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

C#
[Browsable(true)]
public bool IsWordWrapEnabled { get; set; }

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

C#
[Browsable(false)]
public SyntaxEditorPalette Palette { get; set; }

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

C#
[Browsable(true)]
public double ScaleFactor { get; set; }

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

C#
[Browsable(true)]
public bool ShouldTaggersProcessEntireLines { get; set; }

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

C#
[Browsable(true)]
public bool ShowLineNumbers { get; set; }
Property Value:

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

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

C#
[Browsable(false)]
public RadSyntaxEditorElement SyntaxEditorElement { get; }

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

C#
[Browsable(false)]
public TaggersRegistry TaggersRegistry { get; }

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

C#
[Browsable(false)]
public TextFormatDefinitionStack TextFormatDefinitions { get; }

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

C#
[Browsable(true)]
public bool UseShiftKeyInSelection { get; set; }

Methods

Copies the current text selection to the clipboard.

C#
public void Copy()

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

C#
protected override AccessibleObject CreateAccessibilityInstance()
Returns:

AccessibleObject

An AccessibleObject that represents the control for accessibility purposes.

Overrides: Control.CreateAccessibilityInstance()

Creates the input behavior component for the RadSyntaxEditor.

C#
protected override ComponentInputBehavior CreateBehavior()
Returns:

ComponentInputBehavior

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

Overrides: RadControl.CreateBehavior()

Creates the child elements of the RadSyntaxEditor control.

C#
protected override void CreateChildItems(RadElement parent)
Parameters:parentRadElement

The parent element to which child elements will be added.

Overrides: RadControl.CreateChildItems(RadElement)

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

C#
public Point GetPointFromPosition(CaretPosition position)
Parameters:positionCaretPosition

The caret position to convert.

Returns:

Point

A Point representing the visual position of the caret.

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

C#
public CaretPosition GetPositionFromControlPoint(Point point)
Parameters:pointPoint

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

Returns:

CaretPosition

A CaretPosition representing the text position at the specified point.

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

C#
protected override bool IsInputKey(Keys keyData)
Parameters:keyDataKeys

The key to check.

Returns:

bool

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

Overrides: RadControl.IsInputKey(Keys)

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

C#
public void MoveCurrentLineToTop()

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

C#
protected override void OnGotFocus(EventArgs e)
Parameters:eEventArgs

An EventArgs object containing event data.

Overrides: RadControl.OnGotFocus(EventArgs)

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

C#
protected override void OnKeyDown(KeyEventArgs e)
Parameters:eKeyEventArgs

The event data containing information about the key.

Overrides: RadControl.OnKeyDown(KeyEventArgs)

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

C#
protected override void OnKeyPress(KeyPressEventArgs e)
Parameters:eKeyPressEventArgs

The event data containing information about the pressed key.

Overrides: RadControl.OnKeyPress(KeyPressEventArgs)

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

C#
protected override void OnKeyUp(KeyEventArgs e)
Parameters:eKeyEventArgs

The event data containing information about the released key.

Overrides: RadControl.OnKeyUp(KeyEventArgs)

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

C#
protected override void OnLoad(Size desiredSize)
Parameters:desiredSizeSize

The desired size of the control.

Overrides: RadControl.OnLoad(Size)

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

C#
protected override void OnLostFocus(EventArgs e)
Parameters:eEventArgs

An EventArgs object containing event data.

Overrides: RadControl.OnLostFocus(EventArgs)

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

C#
protected override void OnThemeChanged()

Overrides: RadControl.OnThemeChanged()

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

C#
public void PageDown()

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

C#
public void PageUp()

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

C#
protected override bool ProcessDialogChar(char charCode)
Parameters:charCodechar

The character to process.

Returns:

bool

true if the character was processed; otherwise, false.

Overrides: Control.ProcessDialogChar(char)

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

C#
protected override bool ProcessMnemonic(char charCode)
Parameters:charCodechar

The character to process.

Returns:

bool

Always false as the editor does not handle mnemonics.

Overrides: RadControl.ProcessMnemonic(char)

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

C#
protected override void ScaleControl(SizeF factor, BoundsSpecified specified)
Parameters:factorSizeF

The scaling factor to apply.

specifiedBoundsSpecified

A value indicating which bounds of the control to scale.

Overrides: RadControl.ScaleControl(SizeF, BoundsSpecified)

Selects all text in the editor.

C#
public void SelectAll()

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

C#
public void UpdateSelection()

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

C#
public void ZoomIn()

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

C#
public void ZoomOut()

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

C#
public void ZoomTo(double zoomLevel)
Parameters:zoomLeveldouble

The scale factor to be applied to the editor content.

Exceptions:

ArgumentOutOfRangeException

Thrown when the zoomLevel parameter is negative.

Events

Occurs when a command execution results in an error.

C#
public event EventHandler<CommandErrorEventArgs> CommandError

Occurs after a command has been successfully executed.

C#
public event EventHandler<CommandExecutedEventArgs> CommandExecuted

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

C#
public event EventHandler<CommandExecutingEventArgs> CommandExecuting

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

C#
public event EventHandler DocumentChanged

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

C#
public event EventHandler DocumentChanging

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

C#
public event EventHandler<TextContentChangedEventArgs> DocumentContentChanged

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

C#
public event EventHandler<TextContentChangingEventArgs> DocumentContentChanging

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

C#
public event EventHandler IsReadOnlyChanged

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

C#
public event EventHandler LayoutPropertiesChanged

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

C#
public event EventHandler<PreviewSyntaxEditorInputEventArgs> PreviewSyntaxEditorInput

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

C#
public event EventHandler<PreviewSyntaxEditorKeyEventArgs> PreviewSyntaxEditorKeyDown

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

C#
public event EventHandler<PreviewSyntaxEditorKeyEventArgs> PreviewSyntaxEditorKeyUp

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

C#
public event EventHandler<PreviewSyntaxEditorMouseButtonEventArgs> PreviewSyntaxEditorMouseLeftButtonDown

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

C#
public event EventHandler<PreviewSyntaxEditorMouseButtonEventArgs> PreviewSyntaxEditorMouseRightButtonDown

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

C#
public event EventHandler ScaleFactorChanged

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

C#
public event EventHandler SelectionChanged

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

C#
public event EventHandler ViewportChanged