Class RadSyntaxEditor
Class RadSyntaxEditor. Implements the ITextDocumentEditor
Inheritance
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.SyntaxEditor.dll
Syntax
[TelerikToolboxCategory("Input")]
public class RadSyntaxEditor : Control, IThemable, ITextDocumentEditor, IDisposable
Constructors
RadSyntaxEditor()
Fields
AcceptsReturnProperty
Registers the AcceptsReturn property.
Declaration
public static readonly DependencyProperty AcceptsReturnProperty
Field Value
System.Windows.DependencyProperty
|
AllowScalingProperty
Registers the AllowScaling dependency property.
Declaration
public static readonly DependencyProperty AllowScalingProperty
Field Value
System.Windows.DependencyProperty
|
AutoScrollToCaretOnTextChangeProperty
Registers the AutoScrollToCaretOnTextChange dependency property.
Declaration
public static readonly DependencyProperty AutoScrollToCaretOnTextChangeProperty
Field Value
System.Windows.DependencyProperty
|
CaretBrushProperty
Registers the CaretBrush dependency property.
Declaration
public static readonly DependencyProperty CaretBrushProperty
Field Value
System.Windows.DependencyProperty
|
EditorFontFamilyProperty
Registers the EditorFontFamily dependency property.
Declaration
public static readonly DependencyProperty EditorFontFamilyProperty
Field Value
System.Windows.DependencyProperty
|
EditorFontSizeProperty
Registers the EditorFontSize dependency property.
Declaration
public static readonly DependencyProperty EditorFontSizeProperty
Field Value
System.Windows.DependencyProperty
|
HorizontalScrollBarVisibilityProperty
Registers the HorizontalScrollBarVisibility dependency property.
Declaration
public static readonly DependencyProperty HorizontalScrollBarVisibilityProperty
Field Value
System.Windows.DependencyProperty
|
IndentProviderProperty
Registers the IndentProvider property.
Declaration
public static readonly DependencyProperty IndentProviderProperty
Field Value
System.Windows.DependencyProperty
|
InsertModeProperty
Registers the InsertMode property.
Declaration
public static readonly DependencyProperty InsertModeProperty
Field Value
System.Windows.DependencyProperty
|
IsCaretVisibleProperty
Registers the IsCaretVisible dependency property.
Declaration
public static readonly DependencyProperty IsCaretVisibleProperty
Field Value
System.Windows.DependencyProperty
|
IsReadOnlyProperty
Registers the IsReadOnly property.
Declaration
public static readonly DependencyProperty IsReadOnlyProperty
Field Value
System.Windows.DependencyProperty
|
IsSelectionEnabledProperty
Registers the IsSelectionEnabled dependency property.
Declaration
public static readonly DependencyProperty IsSelectionEnabledProperty
Field Value
System.Windows.DependencyProperty
|
IsWordWrapEnabledProperty
Registers the IsWordWrapEnabled dependency property.
Declaration
public static readonly DependencyProperty IsWordWrapEnabledProperty
Field Value
System.Windows.DependencyProperty
|
PaletteProperty
Registers the Palette dependency property.
Declaration
public static readonly DependencyProperty PaletteProperty
Field Value
System.Windows.DependencyProperty
|
ScaleFactorProperty
Registers the ScaleFactor dependency property.
Declaration
public static readonly DependencyProperty ScaleFactorProperty
Field Value
System.Windows.DependencyProperty
|
SearchPanelWidthProperty
Registers the SearchPanelWidth dependency property.
Declaration
public static readonly DependencyProperty SearchPanelWidthProperty
Field Value
System.Windows.DependencyProperty
|
SelectionFillProperty
Registers the SelectionFill dependency property.
Declaration
public static readonly DependencyProperty SelectionFillProperty
Field Value
System.Windows.DependencyProperty
|
SelectionStrokeProperty
Registers the SelectionStroke dependency property.
Declaration
public static readonly DependencyProperty SelectionStrokeProperty
Field Value
System.Windows.DependencyProperty
|
ShouldTaggersProcessEntireLinesProperty
Registers the ShouldTaggersProcessEntireLines dependency property.
Declaration
public static readonly DependencyProperty ShouldTaggersProcessEntireLinesProperty
Field Value
System.Windows.DependencyProperty
|
VerticalScrollBarVisibilityProperty
Registers the VerticalScrollBarVisibility dependency property.
Declaration
public static readonly DependencyProperty VerticalScrollBarVisibilityProperty
Field Value
System.Windows.DependencyProperty
|
Properties
AcceptsReturn
Gets or sets a value indicating whether [accepts return].
Declaration
public bool AcceptsReturn { get; set; }
Property Value
System.Boolean
|
AllowScaling
Gets or sets a value indicating whether [allow scaling].
Declaration
public bool AllowScaling { get; set; }
Property Value
System.Boolean
|
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
public bool AutoScrollToCaretOnTextChange { get; set; }
Property Value
System.Boolean
|
CaretBrush
Gets or sets the brush of the active caret in the editor.
Declaration
public Brush CaretBrush { get; set; }
Property Value
System.Windows.Media.Brush
|
CaretDisplayMode
Gets or sets the caret display mode.
Declaration
public CaretDisplayMode CaretDisplayMode { get; set; }
Property Value
CaretDisplayMode
The caret display mode. |
CaretPosition
Gets the caret position.
Declaration
public CaretPosition CaretPosition { get; }
Property Value
CaretPosition
The caret position. |
Commands
Gets the commands.
Declaration
public SyntaxEditorCommands Commands { get; }
Property Value
SyntaxEditorCommands
The commands. |
CurrentInsertMode
Gets or sets the current insert mode.
Declaration
public string CurrentInsertMode { get; set; }
Property Value
System.String
The current insert mode. |
Document
Gets or sets the text document.
Declaration
public TextDocument Document { get; set; }
Property Value
TextDocument
The document. |
Implements
EditorFontFamily
Gets or sets a value indicating the font family of the text editor.
Declaration
public FontFamily EditorFontFamily { get; set; }
Property Value
System.Windows.Media.FontFamily
|
EditorFontSize
Gets or sets a value indicating the font size of the text editor.
Declaration
public double EditorFontSize { get; set; }
Property Value
System.Double
|
EditorPresenter
Gets the editor presenter.
Declaration
public SyntaxEditorPresenter EditorPresenter { get; }
Property Value
SyntaxEditorPresenter
The editor presenter. |
FoldingManager
Gets the folding manager.
Declaration
public FoldingManager FoldingManager { get; }
Property Value
FoldingManager
The folding manager. |
HorizontalScrollBar
Gets the horizontal scroll bar.
Declaration
public ScrollBar HorizontalScrollBar { get; }
Property Value
System.Windows.Controls.Primitives.ScrollBar
The horizontal scroll bar. |
HorizontalScrollBarVisibility
Gets or sets the horizontal scroll bar visibility.
Declaration
public ScrollBarVisibility HorizontalScrollBarVisibility { get; set; }
Property Value
System.Windows.Controls.ScrollBarVisibility
The horizontal scroll bar visibility. |
IndentProvider
Gets or sets the indent provider.
Declaration
public ISmartIndentProvider IndentProvider { get; set; }
Property Value
ISmartIndentProvider
The indent provider. |
IntelliPrompts
Gets the intelli prompts.
Declaration
public SyntaxEditorIntelliPrompts IntelliPrompts { get; }
Property Value
SyntaxEditorIntelliPrompts
The intelli prompts. |
IsCaretVisible
Gets or sets a value indicating whether this instance is caret visible.
Declaration
public bool IsCaretVisible { get; set; }
Property Value
System.Boolean
|
IsInUndoGroup
Gets a value indicating whether this instance is in undo group.
Declaration
public bool IsInUndoGroup { get; }
Property Value
System.Boolean
|
IsOverwriteModeEnabled
Gets or sets a value indicating whether this instance is overwrite mode enabled.
Declaration
public bool IsOverwriteModeEnabled { get; set; }
Property Value
System.Boolean
|
IsReadOnly
Gets or sets a value indicating whether this instance is read only.
Declaration
public bool IsReadOnly { get; set; }
Property Value
System.Boolean
|
IsSelectionEnabled
Gets or sets a value indicating whether this instance is selection enabled.
Declaration
public bool IsSelectionEnabled { get; set; }
Property Value
System.Boolean
|
IsWordWrapEnabled
Gets or sets a value indicating whether the word wrapping mode is enabled.
Declaration
public bool IsWordWrapEnabled { get; set; }
Property Value
System.Boolean
|
KeyBindings
Gets the key bindings.
Declaration
public KeyBindingUtilities KeyBindings { get; }
Property Value
KeyBindingUtilities
The key bindings. |
Margins
Gets the margins.
Declaration
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
public SyntaxEditorPalette Palette { get; set; }
Property Value
SyntaxEditorPalette
|
Properties
Gets the properties.
Declaration
public SyntaxEditorProperties Properties { get; }
Property Value
SyntaxEditorProperties
The properties. |
ScaleFactor
Gets or sets the scale factor.
Declaration
public double ScaleFactor { get; set; }
Property Value
System.Double
The scale factor. |
SearchPanelWidth
Gets or sets a value indicating the width of the search panel.
Declaration
public double SearchPanelWidth { get; set; }
Property Value
System.Double
|
Selection
Gets the selection.
Declaration
public Selection Selection { get; }
Property Value
Selection
The selection. |
SelectionFill
Gets or sets the selection fill.
Declaration
public Brush SelectionFill { get; set; }
Property Value
System.Windows.Media.Brush
The selection fill. |
SelectionStroke
Gets or sets the selection stroke.
Declaration
public Brush SelectionStroke { get; set; }
Property Value
System.Windows.Media.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
public bool ShouldTaggersProcessEntireLines { get; set; }
Property Value
System.Boolean
|
TaggersRegistry
Gets the taggers registry.
Declaration
public TaggersRegistry TaggersRegistry { get; }
Property Value
TaggersRegistry
The taggers registry. |
TextFormatDefinitions
Gets the text format definitions.
Declaration
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
public double TouchMarkerDragDistance { get; set; }
Property Value
System.Double
|
UILayersBuilder
Gets or sets the UI layers builder.
Declaration
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
public bool UseMonospacedFontOptimization { get; set; }
Property Value
System.Boolean
|
UseShiftKeyInSelection
Gets or sets a value indicating whether [use shift key in selection].
Declaration
public bool UseShiftKeyInSelection { get; set; }
Property Value
System.Boolean
|
VerticalScrollBar
Gets the vertical scroll bar.
Declaration
public ScrollBar VerticalScrollBar { get; }
Property Value
System.Windows.Controls.Primitives.ScrollBar
The vertical scroll bar. |
VerticalScrollBarVisibility
Gets or sets the vertical scroll bar visibility.
Declaration
public ScrollBarVisibility VerticalScrollBarVisibility { get; set; }
Property Value
System.Windows.Controls.ScrollBarVisibility
The vertical scroll bar visibility. |
Viewport
Gets the viewport.
Declaration
public Rect Viewport { get; }
Property Value
System.Windows.Rect
The viewport. |
Methods
Backspace()
Backspaces this instance.
Declaration
public void Backspace()
BeginUndoGroup()
Begins the undo group.
Declaration
public void BeginUndoGroup()
CancelUndoGroup()
Cancels the undo group.
Declaration
public void CancelUndoGroup()
CloseFindDialog()
Closes the find dialog.
Declaration
public void CloseFindDialog()
CompleteCode()
Completes the code.
Declaration
public void CompleteCode()
Copy()
Copies this instance.
Declaration
public void Copy()
CreateSyntaxEditorHistoryState()
Creates the state of the code editor history.
Declaration
public SyntaxEditorHistoryState CreateSyntaxEditorHistoryState()
Returns
SyntaxEditorHistoryState
SyntaxEditorHistoryState. |
Cut()
Cuts this instance.
Declaration
public void Cut()
DecreaseLineIndent()
Decreases the line indent.
Declaration
public void DecreaseLineIndent()
Delete()
Deletes this instance.
Declaration
public void Delete()
DeleteFullLine()
Deletes the full line.
Declaration
public void DeleteFullLine()
DeleteWordToLeft()
Deletes the word to left.
Declaration
public void DeleteWordToLeft()
DeleteWordToRight()
Deletes the word to right.
Declaration
public void DeleteWordToRight()
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(Boolean)
Releases unmanaged and - optionally - managed resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
System.Boolean
disposing
|
EndUndoGroup()
Ends the undo group.
Declaration
public void EndUndoGroup()
Find(String, Int32)
Finds the specified search text.
Declaration
public Nullable<Span> Find(string searchText, int startIndex)
Parameters
System.String
searchText
The search text. |
System.Int32
startIndex
The start index. |
Returns
System.Nullable<Span>
System.Nullable<Span>. |
Find(String, Int32, Boolean)
Finds the specified search text.
Declaration
public Nullable<Span> Find(string searchText, int startIndex, bool useRegularExpression)
Parameters
System.String
searchText
The search text or regex pattern. |
System.Int32
startIndex
The start index to search in the document. |
System.Boolean
useRegularExpression
If set to |
Returns
System.Nullable<Span>
Nullable Span which, when not null, indicates the found text. |
Find(String, Int32, Boolean, Boolean)
Finds the specified search text.
Declaration
public Nullable<Span> Find(string searchText, int startIndex, bool matchCase, bool useRegularExpression)
Parameters
System.String
searchText
The search text or regex pattern. |
System.Int32
startIndex
The start index to search in the document. |
System.Boolean
matchCase
Indicates whether the search is case-sensitive. |
System.Boolean
useRegularExpression
If set to |
Returns
System.Nullable<Span>
Nullable Span which, when not null, indicates the found text. |
Find(String, Int32, Boolean, Boolean, Boolean)
Finds the specified search text.
Declaration
public Nullable<Span> Find(string searchText, int startIndex, bool matchCase, bool useRegularExpression, bool matchWord)
Parameters
System.String
searchText
The search text or regex pattern. |
System.Int32
startIndex
The start index to search in the document. |
System.Boolean
matchCase
Indicates whether the search is case-sensitive. |
System.Boolean
useRegularExpression
If set to |
System.Boolean
matchWord
If set to |
Returns
System.Nullable<Span>
Nullable Span which, when not null, indicates the found text. |
FindAll(String)
Finds all spans with the given searchText.
Declaration
public IEnumerable<Span> FindAll(string searchText)
Parameters
System.String
searchText
The search text. |
Returns
System.Collections.Generic.IEnumerable<Span>
List of all matched spans. |
FindAll(String, Boolean)
Finds all spans with the given searchText or regex pattern.
Declaration
public IEnumerable<Span> FindAll(string searchText, bool useRegularExpression)
Parameters
System.String
searchText
The search text or regex pattern. |
System.Boolean
useRegularExpression
If set to |
Returns
System.Collections.Generic.IEnumerable<Span>
List of all matched spans. |
FindAll(String, Boolean, Boolean)
Finds all spans with the given searchText or regex pattern.
Declaration
public IEnumerable<Span> FindAll(string searchText, bool matchCase, bool useRegularExpression)
Parameters
System.String
searchText
The search text or regex pattern. |
System.Boolean
matchCase
Indicates whether the search is case-sensitive. |
System.Boolean
useRegularExpression
If set to |
Returns
System.Collections.Generic.IEnumerable<Span>
List of all matched spans. |
FindAll(String, Boolean, Boolean, Boolean)
Finds all spans with the given searchText or regex pattern.
Declaration
public IEnumerable<Span> FindAll(string searchText, bool matchCase, bool useRegularExpression, bool matchWord)
Parameters
System.String
searchText
The search text or regex pattern. |
System.Boolean
matchCase
Indicates whether the search is case-sensitive. |
System.Boolean
useRegularExpression
If set to |
System.Boolean
matchWord
If set to |
Returns
System.Collections.Generic.IEnumerable<Span>
List of all matched spans. |
FindPrevious(String, Int32, Boolean)
Finds the specified search text before the current index.
Declaration
public Nullable<Span> FindPrevious(string searchText, int startIndex, bool matchCase)
Parameters
System.String
searchText
The search text or regex pattern. |
System.Int32
startIndex
The start index to search in the document. |
System.Boolean
matchCase
Indicates whether the search is case-sensitive. |
Returns
System.Nullable<Span>
Nullable Span which, when not null, indicates the found text. |
FindPrevious(String, Int32, Boolean, Boolean, Boolean)
Finds the specified search text before the current index.
Declaration
public Nullable<Span> FindPrevious(string searchText, int startIndex, bool matchCase, bool useRegularExpression, bool matchWord)
Parameters
System.String
searchText
The search text or regex pattern. |
System.Int32
startIndex
The start index to search in the document. |
System.Boolean
matchCase
Indicates whether the search is case-sensitive. |
System.Boolean
useRegularExpression
If set to |
System.Boolean
matchWord
If set to |
Returns
System.Nullable<Span>
Nullable Span which, when not null, indicates the found text. |
GetLineBoundingRectangleByLineNumber(Int32, Boolean)
Gets the line bounding rectangle by line number.
Declaration
public Rect GetLineBoundingRectangleByLineNumber(int lineNumber, bool cutToBaseline = false)
Parameters
System.Int32
lineNumber
|
System.Boolean
cutToBaseline
|
Returns
System.Windows.Rect
|
GetLinePartBoundingRectangle(Span, Boolean)
Gets the line part bounding rectangle.
Declaration
public Rect GetLinePartBoundingRectangle(Span span, bool cutToBaseline = false)
Parameters
Span
span
|
System.Boolean
cutToBaseline
|
Returns
System.Windows.Rect
|
GetPointFromPosition(CaretPosition)
Gets the point from position.
Declaration
public Point GetPointFromPosition(CaretPosition position)
Parameters
CaretPosition
position
The position. |
Returns
System.Windows.Point
Point. |
GetPositionFromPoint(Point)
Gets the position from point.
Declaration
public CaretPosition GetPositionFromPoint(Point point)
Parameters
System.Windows.Point
point
The point. |
Returns
CaretPosition
CaretPosition. |
GotoLine(Int32, Boolean)
Navigates to the line by number.
Declaration
public void GotoLine(int lineNumber, bool focusSyntaxEditor = false)
Parameters
System.Int32
lineNumber
The line number. |
System.Boolean
focusSyntaxEditor
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
public void HighlightAllMatches(string searchText)
Parameters
System.String
searchText
|
IncreaseLineIndent()
Increases the line indent.
Declaration
public void IncreaseLineIndent()
Indent()
Indents this instance.
Declaration
public void Indent()
InitializeTouch(SyntaxEditorPresenter)
Called when touch manager methods are being initialized for the SyntaxEditorPresenter.
Declaration
protected virtual void InitializeTouch(SyntaxEditorPresenter presenter)
Parameters
SyntaxEditorPresenter
presenter
|
Insert(String)
Inserts the specified text.
Declaration
public void Insert(string text)
Parameters
System.String
text
The text. |
InsertNewLine()
Inserts the new line.
Declaration
public void InsertNewLine()
InsertTab()
Inserts the tab.
Declaration
public void InsertTab()
InvalidateEditorLayout()
Invalidates the editor layout.
Declaration
public void InvalidateEditorLayout()
InvalidateEditorLayout(Boolean)
Invalidates the editor layout.
Declaration
public void InvalidateEditorLayout(bool force)
Parameters
System.Boolean
force
|
MeasureOverride(Size)
Called when control is measured.
Declaration
protected override Size MeasureOverride(Size constraint)
Parameters
System.Windows.Size
constraint
|
Returns
System.Windows.Size
|
MoveCurrentLineToBottom()
Moves the current line to bottom.
Declaration
public void MoveCurrentLineToBottom()
MoveCurrentLineToTop()
Moves the current line to top.
Declaration
public void MoveCurrentLineToTop()
NavigateNextMatch(String)
NavigatePreviousMatch(String)
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call System.Windows.FrameworkElement.ApplyTemplate.
Declaration
public override void OnApplyTemplate()
OnCommandError(CommandErrorEventArgs)
Handles the CommandError event.
Declaration
protected virtual void OnCommandError(CommandErrorEventArgs args)
Parameters
CommandErrorEventArgs
args
The CommandErrorEventArgs instance containing the event data. |
OnCommandExecuted(CommandExecutedEventArgs)
Handles the CommandExecuted event.
Declaration
protected virtual void OnCommandExecuted(CommandExecutedEventArgs e)
Parameters
CommandExecutedEventArgs
e
The CommandExecutedEventArgs instance containing the event data. |
OnCommandExecuting(CommandExecutingEventArgs)
Handles the CommandExecuting event.
Declaration
protected virtual void OnCommandExecuting(CommandExecutingEventArgs args)
Parameters
CommandExecutingEventArgs
args
The CommandExecutingEventArgs instance containing the event data. |
OnCreateAutomationPeer()
Returns class-specific System.Windows.Automation.Peers.AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
System.Windows.Automation.Peers.AutomationPeer
The type-specific System.Windows.Automation.Peers.AutomationPeer implementation. |
OnDocumentChanged()
Called when [document changed].
Declaration
protected virtual void OnDocumentChanged()
OnDocumentChanging()
Called when [document changing].
Declaration
protected virtual void OnDocumentChanging()
OnDocumentContentChanged(TextContentChangedEventArgs)
Handles the DocumentContentChanged event.
Declaration
protected virtual void OnDocumentContentChanged(TextContentChangedEventArgs args)
Parameters
TextContentChangedEventArgs
args
The TextContentChangedEventArgs instance containing the event data. |
OnDocumentContentChanging(TextContentChangingEventArgs)
Handles the DocumentContentChanging event.
Declaration
protected virtual void OnDocumentContentChanging(TextContentChangingEventArgs args)
Parameters
TextContentChangingEventArgs
args
The TextContentChangingEventArgs instance containing the event data. |
OnGotFocus(RoutedEventArgs)
Invoked whenever an unhandled System.Windows.UIElement.GotFocus event reaches this element in its route.
Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
System.Windows.RoutedEventArgs
e
The System.Windows.RoutedEventArgs that contains the event data. |
OnInitialized(EventArgs)
Raises the System.Windows.FrameworkElement.Initialized event. This method is invoked whenever System.Windows.FrameworkElement.IsInitialized is set to true internally.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
System.EventArgs
e
The System.Windows.RoutedEventArgs that contains the event data. |
OnIsReadOnlyChanged(EventArgs)
Handles the IsReadOnlyChanged event.
Declaration
protected virtual void OnIsReadOnlyChanged(EventArgs e)
Parameters
System.EventArgs
e
The System.EventArgs instance containing the event data. |
OnLayoutPropertiesChanged()
Called when [layout properties changed].
Declaration
protected virtual void OnLayoutPropertiesChanged()
OnMouseWheelZoom(Double)
Called when mouse wheel zoom is requested.
Declaration
protected virtual bool OnMouseWheelZoom(double delta)
Parameters
System.Double
delta
The mouse wheel delta. |
Returns
System.Boolean
|
OnPreviewSyntaxEditorInput(PreviewSyntaxEditorInputEventArgs)
Handles the PreviewSyntaxEditorInput event.
Declaration
protected virtual void OnPreviewSyntaxEditorInput(PreviewSyntaxEditorInputEventArgs args)
Parameters
PreviewSyntaxEditorInputEventArgs
args
The PreviewSyntaxEditorInputEventArgs instance containing the event data. |
OnPreviewSyntaxEditorKeyDown(PreviewSyntaxEditorKeyEventArgs)
Handles the PreviewSyntaxEditorKeyDown event.
Declaration
protected virtual void OnPreviewSyntaxEditorKeyDown(PreviewSyntaxEditorKeyEventArgs args)
Parameters
PreviewSyntaxEditorKeyEventArgs
args
The PreviewSyntaxEditorKeyEventArgs instance containing the event data. |
OnPreviewSyntaxEditorKeyUp(PreviewSyntaxEditorKeyEventArgs)
Handles the PreviewSyntaxEditorKeyUp event.
Declaration
protected virtual void OnPreviewSyntaxEditorKeyUp(PreviewSyntaxEditorKeyEventArgs args)
Parameters
PreviewSyntaxEditorKeyEventArgs
args
The PreviewSyntaxEditorKeyEventArgs instance containing the event data. |
OnPreviewSyntaxEditorMouseLeftButtonDown(PreviewSyntaxEditorMouseButtonEventArgs)
Handles the PreviewSyntaxEditorMouseLeftButtonDown event.
Declaration
protected virtual void OnPreviewSyntaxEditorMouseLeftButtonDown(PreviewSyntaxEditorMouseButtonEventArgs args)
Parameters
PreviewSyntaxEditorMouseButtonEventArgs
args
The PreviewSyntaxEditorMouseButtonEventArgs instance containing the event data. |
OnPreviewSyntaxEditorMouseRightButtonDown(PreviewSyntaxEditorMouseButtonEventArgs)
Handles the PreviewSyntaxEditorMouseRightButtonDown event.
Declaration
protected virtual void OnPreviewSyntaxEditorMouseRightButtonDown(PreviewSyntaxEditorMouseButtonEventArgs args)
Parameters
PreviewSyntaxEditorMouseButtonEventArgs
args
The PreviewSyntaxEditorMouseButtonEventArgs instance containing the event data. |
OnPropertyChanged(DependencyPropertyChangedEventArgs)
Occurs when property changes.
Declaration
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
Parameters
System.Windows.DependencyPropertyChangedEventArgs
e
|
OnScaleFactorChanged()
Called when [scale factor changed].
Declaration
protected virtual void OnScaleFactorChanged()
OnSearchPanelClosed()
Called when search panel is closed.
Declaration
protected virtual void OnSearchPanelClosed()
OnSearchPanelOpened()
Called when search panel is opened.
Declaration
protected virtual void OnSearchPanelOpened()
OnSelectionChanged()
Called when the selection changes.
Declaration
protected virtual void OnSelectionChanged()
OnTextSearched(TextSearchedEventArgs)
Handles the TextSearched event.
Declaration
protected virtual void OnTextSearched(TextSearchedEventArgs args)
Parameters
TextSearchedEventArgs
args
The TextSearchedEventArgs instance containing the event data. |
OnViewportChanged()
Called when [viewport changed].
Declaration
protected virtual void OnViewportChanged()
OpenFindDialog(String)
Opens the find dialog with the specified searchText in the search textbox.
Declaration
public void OpenFindDialog(string searchText)
Parameters
System.String
searchText
The search text. |
PageDown()
Pages down.
Declaration
public void PageDown()
PageUp()
Pages up.
Declaration
public void PageUp()
Paste()
Pastes this instance.
Declaration
public void Paste()
Redo()
Redoes this instance.
Declaration
public bool Redo()
Returns
System.Boolean
System.Boolean. |
ReplaceAllMatches(String, String, Boolean, Boolean)
Replaces all matches.
Declaration
public int ReplaceAllMatches(string searchText, string replaceText, bool matchCase, bool useRegularExpression)
Parameters
System.String
searchText
The search text. |
System.String
replaceText
The replace text. |
System.Boolean
matchCase
The match case. |
System.Boolean
useRegularExpression
The use regular expression. |
Returns
System.Int32
System.Int32. |
ReplaceAllMatches(String, String, Boolean, Boolean, Boolean)
Replaces all matches.
Declaration
public int ReplaceAllMatches(string searchText, string replaceText, bool matchCase, bool useRegularExpression, bool matchWord)
Parameters
System.String
searchText
The search text. |
System.String
replaceText
The replace text. |
System.Boolean
matchCase
The match case. |
System.Boolean
useRegularExpression
The use regular expression. |
System.Boolean
matchWord
The match word. |
Returns
System.Int32
System.Int32. |
ReplaceNextMatch(String, Int32, String, Boolean, Boolean)
Replaces the next match.
Declaration
public bool ReplaceNextMatch(string searchText, int startIndex, string replaceText, bool matchCase, bool useRegularExpression)
Parameters
System.String
searchText
The search text. |
System.Int32
startIndex
The start index. |
System.String
replaceText
The replace text. |
System.Boolean
matchCase
The match case. |
System.Boolean
useRegularExpression
The use regular expression. |
Returns
System.Boolean
System.Boolean. |
RestoreSyntaxEditorHistoryState(SyntaxEditorHistoryState)
Restores the state of the code editor history.
Declaration
public void RestoreSyntaxEditorHistoryState(SyntaxEditorHistoryState historyState)
Parameters
SyntaxEditorHistoryState
historyState
State of the history. |
SelectAll()
Selects all.
Declaration
public void SelectAll()
ToggleInsertMode()
Toggles the insert mode.
Declaration
public void ToggleInsertMode()
Undo()
Undoes this instance.
Declaration
public bool Undo()
Returns
System.Boolean
|
Unindent()
Unindents this instance.
Declaration
public void Unindent()
UpdateSelection()
Updates the selection.
Declaration
public void UpdateSelection()
ZoomIn(Double)
Zooms in.
Declaration
public void ZoomIn(double zoomFactor = 1.1)
Parameters
System.Double
zoomFactor
The zoom increase factor. Should be a number greater than 1. Default value is 1.1. |
ZoomOut(Double)
Zooms out.
Declaration
public void ZoomOut(double zoomFactor = 0.91)
Parameters
System.Double
zoomFactor
The zoom decrease factor. Should be a number less than 1. Default value is 0.91. |
ZoomTo(Double)
Zooms to particular zoom level.
Declaration
public void ZoomTo(double zoomLevel)
Parameters
System.Double
zoomLevel
The zoom level. |
Exceptions
System.ArgumentOutOfRangeException
ZoomLevel must be non negative. |
Events
CommandError
Occurs when command error is produced.
Declaration
public event EventHandler<CommandErrorEventArgs> CommandError
Event Type
System.EventHandler<CommandErrorEventArgs>
|
CommandExecuted
Occurs when command is executed.
Declaration
public event EventHandler<CommandExecutedEventArgs> CommandExecuted
Event Type
System.EventHandler<CommandExecutedEventArgs>
|
CommandExecuting
Occurs when command is executing.
Declaration
public event EventHandler<CommandExecutingEventArgs> CommandExecuting
Event Type
System.EventHandler<CommandExecutingEventArgs>
|
DocumentChanged
Occurs when document has been changed.
Declaration
public event EventHandler DocumentChanged
Event Type
System.EventHandler
|
Implements
DocumentChanging
Occurs when document is being changed.
Declaration
public event EventHandler DocumentChanging
Event Type
System.EventHandler
|
Implements
DocumentContentChanged
DocumentContentChanged event.
Declaration
public event EventHandler<TextContentChangedEventArgs> DocumentContentChanged
Event Type
System.EventHandler<TextContentChangedEventArgs>
|
Implements
DocumentContentChanging
DocumentContentChanging event.
Declaration
public event EventHandler<TextContentChangingEventArgs> DocumentContentChanging
Event Type
System.EventHandler<TextContentChangingEventArgs>
|
IsReadOnlyChanged
Occurs when the readonly state has changed.
Declaration
public event EventHandler IsReadOnlyChanged
Event Type
System.EventHandler
|
LayoutPropertiesChanged
Occurs when layout properties are changed.
Declaration
public event EventHandler LayoutPropertiesChanged
Event Type
System.EventHandler
|
PreviewSyntaxEditorInput
Occurs when text input in the syntax editor is starting.
Declaration
public event EventHandler<PreviewSyntaxEditorInputEventArgs> PreviewSyntaxEditorInput
Event Type
System.EventHandler<PreviewSyntaxEditorInputEventArgs>
|
PreviewSyntaxEditorKeyDown
Occurs when key down is pressed.
Declaration
public event EventHandler<PreviewSyntaxEditorKeyEventArgs> PreviewSyntaxEditorKeyDown
Event Type
System.EventHandler<PreviewSyntaxEditorKeyEventArgs>
|
PreviewSyntaxEditorKeyUp
Occurs when a key is released.
Declaration
public event EventHandler<PreviewSyntaxEditorKeyEventArgs> PreviewSyntaxEditorKeyUp
Event Type
System.EventHandler<PreviewSyntaxEditorKeyEventArgs>
|
PreviewSyntaxEditorMouseLeftButtonDown
Occurs when mouse left button down is pressed.
Declaration
public event EventHandler<PreviewSyntaxEditorMouseButtonEventArgs> PreviewSyntaxEditorMouseLeftButtonDown
Event Type
System.EventHandler<PreviewSyntaxEditorMouseButtonEventArgs>
|
PreviewSyntaxEditorMouseRightButtonDown
Occurs when mouse right button down is pressed.
Declaration
public event EventHandler<PreviewSyntaxEditorMouseButtonEventArgs> PreviewSyntaxEditorMouseRightButtonDown
Event Type
System.EventHandler<PreviewSyntaxEditorMouseButtonEventArgs>
|
ScaleFactorChanged
Occurs when scale factor changes.
Declaration
public event EventHandler ScaleFactorChanged
Event Type
System.EventHandler
|
SearchPanelClosed
Occurs when the search panel is closed.
Declaration
public event EventHandler SearchPanelClosed
Event Type
System.EventHandler
|
SearchPanelOpened
Occurs when the search panel is opened.
Declaration
public event EventHandler SearchPanelOpened
Event Type
System.EventHandler
|
SelectionChanged
Occurs when the selection of the control changes.
Declaration
public event EventHandler SelectionChanged
Event Type
System.EventHandler
|
TextSearched
Occurs when a text is searched in the control.
Declaration
public event EventHandler<TextSearchedEventArgs> TextSearched
Event Type
System.EventHandler<TextSearchedEventArgs>
|
ViewportChanged
Occurs when the viewport changes.
Declaration
public event EventHandler ViewportChanged
Event Type
System.EventHandler
|