Class
RadSyntaxEditor

Class RadSyntaxEditor. Implements the ITextDocumentEditor

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.SyntaxEditor.dll

Syntax:

cs-api-definition
[TelerikToolboxCategory("Input")]
public class RadSyntaxEditor : Control, ITextDocumentEditor, IDisposable

Inheritance: objectRadSyntaxEditor

Implements: IDisposableITextDocumentEditor

Constructors

RadSyntaxEditor()

Initializes a new instance of the RadSyntaxEditor class.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public RadSyntaxEditor()

Fields

AcceptsReturnProperty

Registers the AcceptsReturn property.

Declaration

cs-api-definition
public static readonly DependencyProperty AcceptsReturnProperty

Field Value

DependencyProperty

AllowScalingProperty

Registers the AllowScaling dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AllowScalingProperty

Field Value

DependencyProperty

AutoScrollToCaretOnTextChangeProperty

Registers the AutoScrollToCaretOnTextChange dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AutoScrollToCaretOnTextChangeProperty

Field Value

DependencyProperty

CaretBrushProperty

Registers the CaretBrush dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CaretBrushProperty

Field Value

DependencyProperty

EditorFontFamilyProperty

Registers the EditorFontFamily dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty EditorFontFamilyProperty

Field Value

DependencyProperty

EditorFontSizeProperty

Registers the EditorFontSize dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty EditorFontSizeProperty

Field Value

DependencyProperty

HorizontalScrollBarVisibilityProperty

Registers the HorizontalScrollBarVisibility dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty HorizontalScrollBarVisibilityProperty

Field Value

DependencyProperty

IndentProviderProperty

Registers the IndentProvider property.

Declaration

cs-api-definition
public static readonly DependencyProperty IndentProviderProperty

Field Value

DependencyProperty

InsertModeProperty

Registers the InsertMode property.

Declaration

cs-api-definition
public static readonly DependencyProperty InsertModeProperty

Field Value

DependencyProperty

IsCaretVisibleProperty

Registers the IsCaretVisible dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsCaretVisibleProperty

Field Value

DependencyProperty

IsReadOnlyProperty

Registers the IsReadOnly property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsReadOnlyProperty

Field Value

DependencyProperty

IsSelectionEnabledProperty

Registers the IsSelectionEnabled dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsSelectionEnabledProperty

Field Value

DependencyProperty

IsWordWrapEnabledProperty

Registers the IsWordWrapEnabled dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsWordWrapEnabledProperty

Field Value

DependencyProperty

PaletteProperty

Registers the Palette dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty PaletteProperty

Field Value

DependencyProperty

ScaleFactorProperty

Registers the ScaleFactor dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ScaleFactorProperty

Field Value

DependencyProperty

SearchPanelWidthProperty

Registers the SearchPanelWidth dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SearchPanelWidthProperty

Field Value

DependencyProperty

SelectionFillProperty

Registers the SelectionFill dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SelectionFillProperty

Field Value

DependencyProperty

SelectionStrokeProperty

Registers the SelectionStroke dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SelectionStrokeProperty

Field Value

DependencyProperty

ShouldTaggersProcessEntireLinesProperty

Registers the ShouldTaggersProcessEntireLines dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ShouldTaggersProcessEntireLinesProperty

Field Value

DependencyProperty

VerticalScrollBarVisibilityProperty

Registers the VerticalScrollBarVisibility dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty VerticalScrollBarVisibilityProperty

Field Value

DependencyProperty

Properties

AcceptsReturn

Gets or sets a value indicating whether [accepts return].

Declaration

cs-api-definition
public bool AcceptsReturn { get; set; }

Property Value

bool

true if [accepts return]; otherwise, false.

AllowScaling

Gets or sets a value indicating whether [allow scaling].

Declaration

cs-api-definition
public bool AllowScaling { get; set; }

Property Value

bool

true if [allow scaling]; otherwise, false.

AutoScrollToCaretOnTextChange

Gets or sets a value indicating whether the document is automatically scrolled to the CaretPosition when the text inside the document is changed.

Declaration

cs-api-definition
public bool AutoScrollToCaretOnTextChange { get; set; }

Property Value

bool

CaretBrush

Gets or sets the brush of the active caret in the editor.

Declaration

cs-api-definition
public Brush CaretBrush { get; set; }

Property Value

Brush

CaretDisplayMode

Gets or sets the caret display mode.

Declaration

cs-api-definition
public CaretDisplayMode CaretDisplayMode { get; set; }

Property Value

CaretDisplayMode

The caret display mode.

CaretPosition

Gets the caret position.

Declaration

cs-api-definition
public CaretPosition CaretPosition { get; }

Property Value

CaretPosition

The caret position.

Commands

Gets the commands.

Declaration

cs-api-definition
public SyntaxEditorCommands Commands { get; }

Property Value

SyntaxEditorCommands

The commands.

CurrentInsertMode

Gets or sets the current insert mode.

Declaration

cs-api-definition
public string CurrentInsertMode { get; set; }

Property Value

string

The current insert mode.

Document

Gets or sets the text document.

Declaration

cs-api-definition
public TextDocument Document { get; set; }

Property Value

TextDocument

The document.

Implements ITextDocumentEditor.Document

EditorFontFamily

Gets or sets a value indicating the font family of the text editor.

Declaration

cs-api-definition
public FontFamily EditorFontFamily { get; set; }

Property Value

FontFamily

EditorFontSize

Gets or sets a value indicating the font size of the text editor.

Declaration

cs-api-definition
public double EditorFontSize { get; set; }

Property Value

double

EditorPresenter

Gets the editor presenter.

Declaration

cs-api-definition
public SyntaxEditorPresenter EditorPresenter { get; }

Property Value

SyntaxEditorPresenter

The editor presenter.

FoldingManager

Gets the folding manager.

Declaration

cs-api-definition
public FoldingManager FoldingManager { get; }

Property Value

FoldingManager

The folding manager.

HorizontalScrollBar

Gets the horizontal scroll bar.

Declaration

cs-api-definition
public ScrollBar HorizontalScrollBar { get; }

Property Value

ScrollBar

The horizontal scroll bar.

HorizontalScrollBarVisibility

Gets or sets the horizontal scroll bar visibility.

Declaration

cs-api-definition
public ScrollBarVisibility HorizontalScrollBarVisibility { get; set; }

Property Value

ScrollBarVisibility

The horizontal scroll bar visibility.

IndentProvider

Gets or sets the indent provider.

Declaration

cs-api-definition
public ISmartIndentProvider IndentProvider { get; set; }

Property Value

ISmartIndentProvider

The indent provider.

IntelliPrompts

Gets the intelli prompts.

Declaration

cs-api-definition
public SyntaxEditorIntelliPrompts IntelliPrompts { get; }

Property Value

SyntaxEditorIntelliPrompts

The intelli prompts.

IsCaretVisible

Gets or sets a value indicating whether this instance is caret visible.

Declaration

cs-api-definition
public bool IsCaretVisible { get; set; }

Property Value

bool

true if this instance is caret visible; otherwise, false.

IsInUndoGroup

Gets a value indicating whether this instance is in undo group.

Declaration

cs-api-definition
public bool IsInUndoGroup { get; }

Property Value

bool

true if this instance is in undo group; otherwise, false.

IsOverwriteModeEnabled

Gets or sets a value indicating whether this instance is overwrite mode enabled.

Declaration

cs-api-definition
public bool IsOverwriteModeEnabled { get; set; }

Property Value

bool

true if this instance is overwrite mode enabled; otherwise, false.

IsReadOnly

Gets or sets a value indicating whether this instance is read only.

Declaration

cs-api-definition
public bool IsReadOnly { get; set; }

Property Value

bool

true if this instance is read only; otherwise, false.

IsSelectionEnabled

Gets or sets a value indicating whether this instance is selection enabled.

Declaration

cs-api-definition
public bool IsSelectionEnabled { get; set; }

Property Value

bool

true if this instance is selection enabled; otherwise, false.

IsWordWrapEnabled

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

Declaration

cs-api-definition
public bool IsWordWrapEnabled { get; set; }

Property Value

bool

KeyBindings

Gets the key bindings.

Declaration

cs-api-definition
public KeyBindingUtilities KeyBindings { get; }

Property Value

KeyBindingUtilities

The key bindings.

Margins

Gets the margins.

Declaration

cs-api-definition
public SyntaxEditorMargins Margins { get; }

Property Value

SyntaxEditorMargins

The margins.

Palette

Gets or sets the palette of syntax elements' colors used for this RadSyntaxEditor instance.

Declaration

cs-api-definition
public SyntaxEditorPalette Palette { get; set; }

Property Value

SyntaxEditorPalette

Properties

Gets the properties.

Declaration

cs-api-definition
public SyntaxEditorProperties Properties { get; }

Property Value

SyntaxEditorProperties

The properties.

ScaleFactor

Gets or sets the scale factor.

Declaration

cs-api-definition
public double ScaleFactor { get; set; }

Property Value

double

The scale factor.

SearchPanelWidth

Gets or sets a value indicating the width of the search panel.

Declaration

cs-api-definition
public double SearchPanelWidth { get; set; }

Property Value

double

Selection

Gets the selection.

Declaration

cs-api-definition
public Selection Selection { get; }

Property Value

Selection

The selection.

SelectionFill

Gets or sets the selection fill.

Declaration

cs-api-definition
public Brush SelectionFill { get; set; }

Property Value

Brush

The selection fill.

SelectionStroke

Gets or sets the selection stroke.

Declaration

cs-api-definition
public Brush SelectionStroke { get; set; }

Property Value

Brush

The selection stroke.

ShouldTaggersProcessEntireLines

Gets or sets whether taggers are given the entire lines of text (true) or only the currently visible in the viewport part of the text (false) for processing. Default value is false.

Declaration

cs-api-definition
public bool ShouldTaggersProcessEntireLines { get; set; }

Property Value

bool

TaggersRegistry

Gets the taggers registry.

Declaration

cs-api-definition
public TaggersRegistry TaggersRegistry { get; }

Property Value

TaggersRegistry

The taggers registry.

TextFormatDefinitions

Gets the text format definitions.

Declaration

cs-api-definition
public TextFormatDefinitionStack TextFormatDefinitions { get; }

Property Value

TextFormatDefinitionStack

The text format definitions.

TouchMarkerDragDistance

Gets or sets a value indicating the touch drag area around a touch selection marker.

Declaration

cs-api-definition
public double TouchMarkerDragDistance { get; set; }

Property Value

double

UILayersBuilder

Gets or sets the UI layers builder.

Declaration

cs-api-definition
public UILayersBuilder UILayersBuilder { get; set; }

Property Value

UILayersBuilder

The UI layers builder.

UseMonospacedFontOptimization

Gets or sets a value indicating whether [use monospaced font optimization].

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Monospaced")]
public bool UseMonospacedFontOptimization { get; set; }

Property Value

bool

true if [use monospaced font optimization]; otherwise, false.

UseShiftKeyInSelection

Gets or sets a value indicating whether [use shift key in selection].

Declaration

cs-api-definition
public bool UseShiftKeyInSelection { get; set; }

Property Value

bool

true if [use shift key in selection]; otherwise, false.

VerticalScrollBar

Gets the vertical scroll bar.

Declaration

cs-api-definition
public ScrollBar VerticalScrollBar { get; }

Property Value

ScrollBar

The vertical scroll bar.

VerticalScrollBarVisibility

Gets or sets the vertical scroll bar visibility.

Declaration

cs-api-definition
public ScrollBarVisibility VerticalScrollBarVisibility { get; set; }

Property Value

ScrollBarVisibility

The vertical scroll bar visibility.

Viewport

Gets the viewport.

Declaration

cs-api-definition
public Rect Viewport { get; }

Property Value

Rect

The viewport.

Methods

Backspace()

Backspaces this instance.

Declaration

cs-api-definition
public void Backspace()

BeginUndoGroup()

Begins the undo group.

Declaration

cs-api-definition
public void BeginUndoGroup()

CancelUndoGroup()

Cancels the undo group.

Declaration

cs-api-definition
public void CancelUndoGroup()

CloseFindDialog()

Closes the find dialog.

Declaration

cs-api-definition
public void CloseFindDialog()

CompleteCode()

Completes the code.

Declaration

cs-api-definition
public void CompleteCode()

Copy()

Copies this instance.

Declaration

cs-api-definition
public void Copy()

CreateSyntaxEditorHistoryState()

Creates the state of the code editor history.

Declaration

cs-api-definition
public SyntaxEditorHistoryState CreateSyntaxEditorHistoryState()

Returns

SyntaxEditorHistoryState

SyntaxEditorHistoryState.

Cut()

Cuts this instance.

Declaration

cs-api-definition
public void Cut()

DecreaseLineIndent()

Decreases the line indent.

Declaration

cs-api-definition
public void DecreaseLineIndent()

Delete()

Deletes this instance.

Declaration

cs-api-definition
public void Delete()

DeleteFullLine()

Deletes the full line.

Declaration

cs-api-definition
public void DeleteFullLine()

DeleteWordToLeft()

Deletes the word to left.

Declaration

cs-api-definition
public void DeleteWordToLeft()

DeleteWordToRight()

Deletes the word to right.

Declaration

cs-api-definition
public void DeleteWordToRight()

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration

cs-api-definition
public void Dispose()

Implements IDisposable.Dispose()

Dispose(bool)

Releases unmanaged and - optionally - managed resources.

Declaration

cs-api-definition
protected virtual void Dispose(bool disposing)

Parameters

disposing

bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

EndUndoGroup()

Ends the undo group.

Declaration

cs-api-definition
public void EndUndoGroup()

Find(string, int)

Finds the specified search text.

Declaration

cs-api-definition
public Span? Find(string searchText, int startIndex)

Parameters

searchText

string

The search text.

startIndex

int

The start index.

Returns

Span?

System.Nullable<Span>.

Find(string, int, bool)

Finds the specified search text.

Declaration

cs-api-definition
public Span? Find(string searchText, int startIndex, bool useRegularExpression)

Parameters

searchText

string

The search text or regex pattern.

startIndex

int

The start index to search in the document.

useRegularExpression

bool

If set to true indicates that the search text will be used as regular expression search pattern.

Returns

Span?

Nullable Span which, when not null, indicates the found text.

Find(string, int, bool, bool)

Finds the specified search text.

Declaration

cs-api-definition
public Span? Find(string searchText, int startIndex, bool matchCase, bool useRegularExpression)

Parameters

searchText

string

The search text or regex pattern.

startIndex

int

The start index to search in the document.

matchCase

bool

Indicates whether the search is case-sensitive.

useRegularExpression

bool

If set to true indicates that the search text will be used as regular expression search pattern.

Returns

Span?

Nullable Span which, when not null, indicates the found text.

Find(string, int, bool, bool, bool)

Finds the specified search text.

Declaration

cs-api-definition
public Span? Find(string searchText, int startIndex, bool matchCase, bool useRegularExpression, bool matchWord)

Parameters

searchText

string

The search text or regex pattern.

startIndex

int

The start index to search in the document.

matchCase

bool

Indicates whether the search is case-sensitive.

useRegularExpression

bool

If set to true indicates that the search text will be used as regular expression search pattern.

matchWord

bool

If set to true, indicates that the search finds whole words only.

Returns

Span?

Nullable Span which, when not null, indicates the found text.

FindAll(string)

Finds all spans with the given searchText.

Declaration

cs-api-definition
public IEnumerable<Span> FindAll(string searchText)

Parameters

searchText

string

The search text.

Returns

IEnumerable<Span>

List of all matched spans.

FindAll(string, bool)

Finds all spans with the given searchText or regex pattern.

Declaration

cs-api-definition
public IEnumerable<Span> FindAll(string searchText, bool useRegularExpression)

Parameters

searchText

string

The search text or regex pattern.

useRegularExpression

bool

If set to true indicates that the search text will be used as regular expression search pattern.

Returns

IEnumerable<Span>

List of all matched spans.

FindAll(string, bool, bool)

Finds all spans with the given searchText or regex pattern.

Declaration

cs-api-definition
public IEnumerable<Span> FindAll(string searchText, bool matchCase, bool useRegularExpression)

Parameters

searchText

string

The search text or regex pattern.

matchCase

bool

Indicates whether the search is case-sensitive.

useRegularExpression

bool

If set to true indicates that the search text will be used as regular expression search pattern.

Returns

IEnumerable<Span>

List of all matched spans.

FindAll(string, bool, bool, bool)

Finds all spans with the given searchText or regex pattern.

Declaration

cs-api-definition
public IEnumerable<Span> FindAll(string searchText, bool matchCase, bool useRegularExpression, bool matchWord)

Parameters

searchText

string

The search text or regex pattern.

matchCase

bool

Indicates whether the search is case-sensitive.

useRegularExpression

bool

If set to true indicates that the search text will be used as regular expression search pattern.

matchWord

bool

If set to true, indicates that the search finds whole words only.

Returns

IEnumerable<Span>

List of all matched spans.

FindPrevious(string, int, bool)

Finds the specified search text before the current index.

Declaration

cs-api-definition
public Span? FindPrevious(string searchText, int startIndex, bool matchCase)

Parameters

searchText

string

The search text or regex pattern.

startIndex

int

The start index to search in the document.

matchCase

bool

Indicates whether the search is case-sensitive.

Returns

Span?

Nullable Span which, when not null, indicates the found text.

FindPrevious(string, int, bool, bool, bool)

Finds the specified search text before the current index.

Declaration

cs-api-definition
public Span? FindPrevious(string searchText, int startIndex, bool matchCase, bool useRegularExpression, bool matchWord)

Parameters

searchText

string

The search text or regex pattern.

startIndex

int

The start index to search in the document.

matchCase

bool

Indicates whether the search is case-sensitive.

useRegularExpression

bool

If set to true indicates that the search text will be used as regular expression search pattern.

matchWord

bool

If set to true, indicates that the search finds whole words only.

Returns

Span?

Nullable Span which, when not null, indicates the found text.

GetLineBoundingRectangleByLineNumber(int, bool)

Gets the line bounding rectangle by line number.

Declaration

cs-api-definition
public Rect GetLineBoundingRectangleByLineNumber(int lineNumber, bool cutToBaseline = false)

Parameters

lineNumber

int

cutToBaseline

bool

Returns

Rect

GetLinePartBoundingRectangle(Span, bool)

Gets the line part bounding rectangle.

Declaration

cs-api-definition
public Rect GetLinePartBoundingRectangle(Span span, bool cutToBaseline = false)

Parameters

span

Span

cutToBaseline

bool

Returns

Rect

GetPointFromPosition(CaretPosition)

Gets the point from position.

Declaration

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

Parameters

position

CaretPosition

The position.

Returns

Point

Point.

GetPositionFromPoint(Point)

Gets the position from point.

Declaration

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

Parameters

point

Point

The point.

Returns

CaretPosition

CaretPosition.

GotoLine(int, bool)

Navigates to the line by number.

Declaration

cs-api-definition
public void GotoLine(int lineNumber, bool focusSyntaxEditor = false)

Parameters

lineNumber

int

The line number.

focusSyntaxEditor

bool

Specifies if the SyntaxEditor should be focused after navigating to the given line.

HighlightAllMatches(string)

Tries to highlight all span matches via all registered TextSearchHighlightTaggers.

Declaration

cs-api-definition
public void HighlightAllMatches(string searchText)

Parameters

searchText

string

IncreaseLineIndent()

Increases the line indent.

Declaration

cs-api-definition
public void IncreaseLineIndent()

Indent()

Indents this instance.

Declaration

cs-api-definition
public void Indent()

InitializeTouch(SyntaxEditorPresenter)

Called when touch manager methods are being initialized for the SyntaxEditorPresenter.

Declaration

cs-api-definition
protected virtual void InitializeTouch(SyntaxEditorPresenter presenter)

Parameters

presenter

SyntaxEditorPresenter

Insert(string)

Inserts the specified text.

Declaration

cs-api-definition
public void Insert(string text)

Parameters

text

string

The text.

InsertNewLine()

Inserts the new line.

Declaration

cs-api-definition
public void InsertNewLine()

InsertTab()

Inserts the tab.

Declaration

cs-api-definition
public void InsertTab()

InvalidateEditorLayout()

Invalidates the editor layout.

Declaration

cs-api-definition
public void InvalidateEditorLayout()

InvalidateEditorLayout(bool)

Invalidates the editor layout.

Declaration

cs-api-definition
public void InvalidateEditorLayout(bool force)

Parameters

force

bool

MeasureOverride(Size)

Called when control is measured.

Declaration

cs-api-definition
protected override Size MeasureOverride(Size constraint)

Parameters

constraint

Size

Returns

Size

MoveCurrentLineToBottom()

Moves the current line to bottom.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic")]
public void MoveCurrentLineToBottom()

MoveCurrentLineToTop()

Moves the current line to top.

Declaration

cs-api-definition
public void MoveCurrentLineToTop()

NavigateNextMatch(string)

Navigates to the next matched text in the editor.

Declaration

cs-api-definition
public void NavigateNextMatch(string searchText)

Parameters

searchText

string

The search text.

NavigatePreviousMatch(string)

Navigates to the next matched text in the editor.

Declaration

cs-api-definition
public void NavigatePreviousMatch(string searchText)

Parameters

searchText

string

The search text.

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes call .

Declaration

cs-api-definition
public override void OnApplyTemplate()

OnCommandError(CommandErrorEventArgs)

Handles the event.

Declaration

cs-api-definition
protected virtual void OnCommandError(CommandErrorEventArgs args)

Parameters

args

CommandErrorEventArgs

The CommandErrorEventArgs instance containing the event data.

OnCommandExecuted(CommandExecutedEventArgs)

Handles the event.

Declaration

cs-api-definition
protected virtual void OnCommandExecuted(CommandExecutedEventArgs e)

Parameters

e

CommandExecutedEventArgs

The CommandExecutedEventArgs instance containing the event data.

OnCommandExecuting(CommandExecutingEventArgs)

Handles the event.

Declaration

cs-api-definition
protected virtual void OnCommandExecuting(CommandExecutingEventArgs args)

Parameters

args

CommandExecutingEventArgs

The CommandExecutingEventArgs instance containing the event data.

OnCreateAutomationPeer()

Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

The type-specific AutomationPeer implementation.

OnDocumentChanged()

Called when [document changed].

Declaration

cs-api-definition
protected virtual void OnDocumentChanged()

OnDocumentChanging()

Called when [document changing].

Declaration

cs-api-definition
protected virtual void OnDocumentChanging()

OnDocumentContentChanged(TextContentChangedEventArgs)

Handles the event.

Declaration

cs-api-definition
protected virtual void OnDocumentContentChanged(TextContentChangedEventArgs args)

Parameters

args

TextContentChangedEventArgs

The TextContentChangedEventArgs instance containing the event data.

OnDocumentContentChanging(TextContentChangingEventArgs)

Handles the event.

Declaration

cs-api-definition
protected virtual void OnDocumentContentChanging(TextContentChangingEventArgs args)

Parameters

args

TextContentChangingEventArgs

The TextContentChangingEventArgs instance containing the event data.

OnGotFocus(RoutedEventArgs)

Invoked whenever an unhandled event reaches this element in its route.

Declaration

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

Parameters

e

RoutedEventArgs

The RoutedEventArgs that contains the event data.

OnInitialized(EventArgs)

Raises the event. This method is invoked whenever is set to true internally.

Declaration

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

Parameters

e

EventArgs

The RoutedEventArgs that contains the event data.

OnIsReadOnlyChanged(EventArgs)

Handles the event.

Declaration

cs-api-definition
protected virtual void OnIsReadOnlyChanged(EventArgs e)

Parameters

e

EventArgs

The EventArgs instance containing the event data.

OnLayoutPropertiesChanged()

Called when [layout properties changed].

Declaration

cs-api-definition
protected virtual void OnLayoutPropertiesChanged()

OnMouseWheelZoom(double)

Called when mouse wheel zoom is requested.

Declaration

cs-api-definition
protected virtual bool OnMouseWheelZoom(double delta)

Parameters

delta

double

The mouse wheel delta.

Returns

bool

OnPreviewSyntaxEditorInput(PreviewSyntaxEditorInputEventArgs)

Handles the event.

Declaration

cs-api-definition
protected virtual void OnPreviewSyntaxEditorInput(PreviewSyntaxEditorInputEventArgs args)

Parameters

args

PreviewSyntaxEditorInputEventArgs

The PreviewSyntaxEditorInputEventArgs instance containing the event data.

OnPreviewSyntaxEditorKeyDown(PreviewSyntaxEditorKeyEventArgs)

Handles the event.

Declaration

cs-api-definition
protected virtual void OnPreviewSyntaxEditorKeyDown(PreviewSyntaxEditorKeyEventArgs args)

Parameters

args

PreviewSyntaxEditorKeyEventArgs

The PreviewSyntaxEditorKeyEventArgs instance containing the event data.

OnPreviewSyntaxEditorKeyUp(PreviewSyntaxEditorKeyEventArgs)

Handles the event.

Declaration

cs-api-definition
protected virtual void OnPreviewSyntaxEditorKeyUp(PreviewSyntaxEditorKeyEventArgs args)

Parameters

args

PreviewSyntaxEditorKeyEventArgs

The PreviewSyntaxEditorKeyEventArgs instance containing the event data.

OnPreviewSyntaxEditorMouseLeftButtonDown(PreviewSyntaxEditorMouseButtonEventArgs)

Handles the event.

Declaration

cs-api-definition
protected virtual void OnPreviewSyntaxEditorMouseLeftButtonDown(PreviewSyntaxEditorMouseButtonEventArgs args)

Parameters

args

PreviewSyntaxEditorMouseButtonEventArgs

The PreviewSyntaxEditorMouseButtonEventArgs instance containing the event data.

OnPreviewSyntaxEditorMouseRightButtonDown(PreviewSyntaxEditorMouseButtonEventArgs)

Handles the event.

Declaration

cs-api-definition
protected virtual void OnPreviewSyntaxEditorMouseRightButtonDown(PreviewSyntaxEditorMouseButtonEventArgs args)

Parameters

args

PreviewSyntaxEditorMouseButtonEventArgs

The PreviewSyntaxEditorMouseButtonEventArgs instance containing the event data.

OnPropertyChanged(DependencyPropertyChangedEventArgs)

Occurs when property changes.

Declaration

cs-api-definition
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)

Parameters

e

DependencyPropertyChangedEventArgs

OnScaleFactorChanged()

Called when [scale factor changed].

Declaration

cs-api-definition
protected virtual void OnScaleFactorChanged()

OnSearchPanelClosed()

Called when search panel is closed.

Declaration

cs-api-definition
protected virtual void OnSearchPanelClosed()

OnSearchPanelOpened()

Called when search panel is opened.

Declaration

cs-api-definition
protected virtual void OnSearchPanelOpened()

OnSelectionChanged()

Called when the selection changes.

Declaration

cs-api-definition
protected virtual void OnSelectionChanged()

OnTextSearched(TextSearchedEventArgs)

Handles the event.

Declaration

cs-api-definition
protected virtual void OnTextSearched(TextSearchedEventArgs args)

Parameters

args

TextSearchedEventArgs

The TextSearchedEventArgs instance containing the event data.

OnViewportChanged()

Called when [viewport changed].

Declaration

cs-api-definition
protected virtual void OnViewportChanged()

OpenFindDialog(string)

Opens the find dialog with the specified searchText in the search textbox.

Declaration

cs-api-definition
public void OpenFindDialog(string searchText)

Parameters

searchText

string

The search text.

PageDown()

Pages down.

Declaration

cs-api-definition
public void PageDown()

PageUp()

Pages up.

Declaration

cs-api-definition
public void PageUp()

Paste()

Pastes this instance.

Declaration

cs-api-definition
public void Paste()

Redo()

Redoes this instance.

Declaration

cs-api-definition
public bool Redo()

Returns

bool

System.Boolean.

ReplaceAllMatches(string, string, bool, bool)

Replaces all matches.

Declaration

cs-api-definition
public int ReplaceAllMatches(string searchText, string replaceText, bool matchCase, bool useRegularExpression)

Parameters

searchText

string

The search text.

replaceText

string

The replace text.

matchCase

bool

The match case.

useRegularExpression

bool

The use regular expression.

Returns

int

System.Int32.

ReplaceAllMatches(string, string, bool, bool, bool)

Replaces all matches.

Declaration

cs-api-definition
public int ReplaceAllMatches(string searchText, string replaceText, bool matchCase, bool useRegularExpression, bool matchWord)

Parameters

searchText

string

The search text.

replaceText

string

The replace text.

matchCase

bool

The match case.

useRegularExpression

bool

The use regular expression.

matchWord

bool

The match word.

Returns

int

System.Int32.

ReplaceNextMatch(string, int, string, bool, bool)

Replaces the next match.

Declaration

cs-api-definition
public bool ReplaceNextMatch(string searchText, int startIndex, string replaceText, bool matchCase, bool useRegularExpression)

Parameters

searchText

string

The search text.

startIndex

int

The start index.

replaceText

string

The replace text.

matchCase

bool

The match case.

useRegularExpression

bool

The use regular expression.

Returns

bool

System.Boolean.

RestoreSyntaxEditorHistoryState(SyntaxEditorHistoryState)

Restores the state of the code editor history.

Declaration

cs-api-definition
public void RestoreSyntaxEditorHistoryState(SyntaxEditorHistoryState historyState)

Parameters

historyState

SyntaxEditorHistoryState

State of the history.

SelectAll()

Selects all.

Declaration

cs-api-definition
public void SelectAll()

ToggleInsertMode()

Toggles the insert mode.

Declaration

cs-api-definition
public void ToggleInsertMode()

Undo()

Undoes this instance.

Declaration

cs-api-definition
public bool Undo()

Returns

bool

Unindent()

Unindents this instance.

Declaration

cs-api-definition
public void Unindent()

UpdateSelection()

Updates the selection.

Declaration

cs-api-definition
public void UpdateSelection()

ZoomIn(double)

Zooms in.

Declaration

cs-api-definition
public void ZoomIn(double zoomFactor = 1.1)

Parameters

zoomFactor

double

The zoom increase factor. Should be a number greater than 1. Default value is 1.1.

ZoomOut(double)

Zooms out.

Declaration

cs-api-definition
public void ZoomOut(double zoomFactor = 0.91)

Parameters

zoomFactor

double

The zoom decrease factor. Should be a number less than 1. Default value is 0.91.

ZoomTo(double)

Zooms to particular zoom level.

Declaration

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

Parameters

zoomLevel

double

The zoom level.

Exceptions

ArgumentOutOfRangeException

ZoomLevel must be non negative.

Events

CommandError

Occurs when command error is produced.

Declaration

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

Event Value

EventHandler<CommandErrorEventArgs>

CommandExecuted

Occurs when command is executed.

Declaration

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

Event Value

EventHandler<CommandExecutedEventArgs>

CommandExecuting

Occurs when command is executing.

Declaration

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

Event Value

EventHandler<CommandExecutingEventArgs>

DocumentChanged

Occurs when document has been changed.

Declaration

cs-api-definition
public event EventHandler DocumentChanged

Event Value

EventHandler

Implements ITextDocumentEditor.DocumentChanged

DocumentChanging

Occurs when document is being changed.

Declaration

cs-api-definition
public event EventHandler DocumentChanging

Event Value

EventHandler

Implements ITextDocumentEditor.DocumentChanging

DocumentContentChanged

DocumentContentChanged event.

Declaration

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

Event Value

EventHandler<TextContentChangedEventArgs>

Implements ITextDocumentEditor.DocumentContentChanged

DocumentContentChanging

DocumentContentChanging event.

Declaration

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

Event Value

EventHandler<TextContentChangingEventArgs>

IsReadOnlyChanged

Occurs when the readonly state has changed.

Declaration

cs-api-definition
public event EventHandler IsReadOnlyChanged

Event Value

EventHandler

LayoutPropertiesChanged

Occurs when layout properties are changed.

Declaration

cs-api-definition
public event EventHandler LayoutPropertiesChanged

Event Value

EventHandler

PreviewSyntaxEditorInput

Occurs when text input in the syntax editor is starting.

Declaration

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

Event Value

EventHandler<PreviewSyntaxEditorInputEventArgs>

PreviewSyntaxEditorKeyDown

Occurs when key down is pressed.

Declaration

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

Event Value

EventHandler<PreviewSyntaxEditorKeyEventArgs>

PreviewSyntaxEditorKeyUp

Occurs when a key is released.

Declaration

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

Event Value

EventHandler<PreviewSyntaxEditorKeyEventArgs>

PreviewSyntaxEditorMouseLeftButtonDown

Occurs when mouse left button down is pressed.

Declaration

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

Event Value

EventHandler<PreviewSyntaxEditorMouseButtonEventArgs>

PreviewSyntaxEditorMouseRightButtonDown

Occurs when mouse right button down is pressed.

Declaration

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

Event Value

EventHandler<PreviewSyntaxEditorMouseButtonEventArgs>

ScaleFactorChanged

Occurs when scale factor changes.

Declaration

cs-api-definition
public event EventHandler ScaleFactorChanged

Event Value

EventHandler

SearchPanelClosed

Occurs when the search panel is closed.

Declaration

cs-api-definition
public event EventHandler SearchPanelClosed

Event Value

EventHandler

SearchPanelOpened

Occurs when the search panel is opened.

Declaration

cs-api-definition
public event EventHandler SearchPanelOpened

Event Value

EventHandler

SelectionChanged

Occurs when the selection of the control changes.

Declaration

cs-api-definition
public event EventHandler SelectionChanged

Event Value

EventHandler

TextSearched

Occurs when a text is searched in the control.

Declaration

cs-api-definition
public event EventHandler<TextSearchedEventArgs> TextSearched

Event Value

EventHandler<TextSearchedEventArgs>

ViewportChanged

Occurs when the viewport changes.

Declaration

cs-api-definition
public event EventHandler ViewportChanged

Event Value

EventHandler

In this article
DefinitionConstructorsRadSyntaxEditor()FieldsAcceptsReturnPropertyAllowScalingPropertyAutoScrollToCaretOnTextChangePropertyCaretBrushPropertyEditorFontFamilyPropertyEditorFontSizePropertyHorizontalScrollBarVisibilityPropertyIndentProviderPropertyInsertModePropertyIsCaretVisiblePropertyIsReadOnlyPropertyIsSelectionEnabledPropertyIsWordWrapEnabledPropertyPalettePropertyScaleFactorPropertySearchPanelWidthPropertySelectionFillPropertySelectionStrokePropertyShouldTaggersProcessEntireLinesPropertyVerticalScrollBarVisibilityPropertyPropertiesAcceptsReturnAllowScalingAutoScrollToCaretOnTextChangeCaretBrushCaretDisplayModeCaretPositionCommandsCurrentInsertModeDocumentEditorFontFamilyEditorFontSizeEditorPresenterFoldingManagerHorizontalScrollBarHorizontalScrollBarVisibilityIndentProviderIntelliPromptsIsCaretVisibleIsInUndoGroupIsOverwriteModeEnabledIsReadOnlyIsSelectionEnabledIsWordWrapEnabledKeyBindingsMarginsPalettePropertiesScaleFactorSearchPanelWidthSelectionSelectionFillSelectionStrokeShouldTaggersProcessEntireLinesTaggersRegistryTextFormatDefinitionsTouchMarkerDragDistanceUILayersBuilderUseMonospacedFontOptimizationUseShiftKeyInSelectionVerticalScrollBarVerticalScrollBarVisibilityViewportMethodsBackspace()BeginUndoGroup()CancelUndoGroup()CloseFindDialog()CompleteCode()Copy()CreateSyntaxEditorHistoryState()Cut()DecreaseLineIndent()Delete()DeleteFullLine()DeleteWordToLeft()DeleteWordToRight()Dispose()Dispose(bool)EndUndoGroup()Find(string, int)Find(string, int, bool)Find(string, int, bool, bool)Find(string, int, bool, bool, bool)FindAll(string)FindAll(string, bool)FindAll(string, bool, bool)FindAll(string, bool, bool, bool)FindPrevious(string, int, bool)FindPrevious(string, int, bool, bool, bool)GetLineBoundingRectangleByLineNumber(int, bool)GetLinePartBoundingRectangle(Span, bool)GetPointFromPosition(CaretPosition)GetPositionFromPoint(Point)GotoLine(int, bool)HighlightAllMatches(string)IncreaseLineIndent()Indent()InitializeTouch(SyntaxEditorPresenter)Insert(string)InsertNewLine()InsertTab()InvalidateEditorLayout()InvalidateEditorLayout(bool)MeasureOverride(Size)MoveCurrentLineToBottom()MoveCurrentLineToTop()NavigateNextMatch(string)NavigatePreviousMatch(string)OnApplyTemplate()OnCommandError(CommandErrorEventArgs)OnCommandExecuted(CommandExecutedEventArgs)OnCommandExecuting(CommandExecutingEventArgs)OnCreateAutomationPeer()OnDocumentChanged()OnDocumentChanging()OnDocumentContentChanged(TextContentChangedEventArgs)OnDocumentContentChanging(TextContentChangingEventArgs)OnGotFocus(RoutedEventArgs)OnInitialized(EventArgs)OnIsReadOnlyChanged(EventArgs)OnLayoutPropertiesChanged()OnMouseWheelZoom(double)OnPreviewSyntaxEditorInput(PreviewSyntaxEditorInputEventArgs)OnPreviewSyntaxEditorKeyDown(PreviewSyntaxEditorKeyEventArgs)OnPreviewSyntaxEditorKeyUp(PreviewSyntaxEditorKeyEventArgs)OnPreviewSyntaxEditorMouseLeftButtonDown(PreviewSyntaxEditorMouseButtonEventArgs)OnPreviewSyntaxEditorMouseRightButtonDown(PreviewSyntaxEditorMouseButtonEventArgs)OnPropertyChanged(DependencyPropertyChangedEventArgs)OnScaleFactorChanged()OnSearchPanelClosed()OnSearchPanelOpened()OnSelectionChanged()OnTextSearched(TextSearchedEventArgs)OnViewportChanged()OpenFindDialog(string)PageDown()PageUp()Paste()Redo()ReplaceAllMatches(string, string, bool, bool)ReplaceAllMatches(string, string, bool, bool, bool)ReplaceNextMatch(string, int, string, bool, bool)RestoreSyntaxEditorHistoryState(SyntaxEditorHistoryState)SelectAll()ToggleInsertMode()Undo()Unindent()UpdateSelection()ZoomIn(double)ZoomOut(double)ZoomTo(double)EventsCommandErrorCommandExecutedCommandExecutingDocumentChangedDocumentChangingDocumentContentChangedDocumentContentChangingIsReadOnlyChangedLayoutPropertiesChangedPreviewSyntaxEditorInputPreviewSyntaxEditorKeyDownPreviewSyntaxEditorKeyUpPreviewSyntaxEditorMouseLeftButtonDownPreviewSyntaxEditorMouseRightButtonDownScaleFactorChangedSearchPanelClosedSearchPanelOpenedSelectionChangedTextSearchedViewportChanged
Not finding the help you need?
Contact Support