Class EditControl
Represents Edit control. EditControl class contains properties and methods for users to customize and perform various activities related to EditControl.
Inheritance
Implements
Namespace: Syncfusion.Windows.Edit
Assembly: Syncfusion.Edit.Wpf.dll
Syntax
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
public class EditControl : Control, IDisposable
Remarks
EditControl is an text or source code editor control. It can be used to create and modify text and source code files of supported file types. EditControl can be used to create editor applications like notepad or Microsoft Visual Studio IDE.
Examples
<syncfusion:EditControl x:Name = "editControl1">
</syncfsuion:EditControl>
// Initializing EditControl and assigning the text value.
EditControl editControl1 = new EditControl();
Constructors
EditControl()
Initializes a new instance of the EditControl class.
Declaration
public EditControl()
Fields
AcceptsReturnProperty
DependencyProperty for AcceptsReturn Property
Declaration
public static readonly DependencyProperty AcceptsReturnProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
AcceptsTabProperty
DependencyProperty for AcceptsTab
Declaration
public static readonly DependencyProperty AcceptsTabProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ActualLineNumberAreaWidthProperty
DependencyProperty for ActualLineNumberAreaWidth Property
Declaration
public static readonly DependencyProperty ActualLineNumberAreaWidthProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
AllowDragDropProperty
DependencyProperty for AllowDragDrop
Declaration
public static readonly DependencyProperty AllowDragDropProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
AssemblyReferencesProperty
DependencyProperty for AssemblyReferences
Declaration
public static readonly DependencyProperty AssemblyReferencesProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
BlockIndicatorLineStrokeProperty
DependencyProperty for BlockIndicatorLineStroke Property
Declaration
public static readonly DependencyProperty BlockIndicatorLineStrokeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
BlockIndicatorLineThicknessProperty
DependencyProperty for BlockIndicatorLineThickness Property
Declaration
public static readonly DependencyProperty BlockIndicatorLineThicknessProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
CaretBrushProperty
DependencyProperty for CaretBrush Property
Declaration
public static readonly DependencyProperty CaretBrushProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ChangesIndicatorWidthProperty
DependencyProperty for ChangesIndicatorWidth Property
Declaration
public static readonly DependencyProperty ChangesIndicatorWidthProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
checkSource
Declaration
public bool checkSource
Field Value
Type |
---|
System.Boolean |
CollapsedTextForegroundProperty
DependencyProperty for CollapsedTextForeground Property
Declaration
public static readonly DependencyProperty CollapsedTextForegroundProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
CustomLanguageProperty
DependencyProperty for CustomLanguage
Declaration
public static readonly DependencyProperty CustomLanguageProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
DocumentLanguageProperty
DependencyProperty for DocumentLanguage
Declaration
public static readonly DependencyProperty DocumentLanguageProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
DocumentSourceProperty
DependencyProperty for DocumentSource
Declaration
public static readonly DependencyProperty DocumentSourceProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
EnableIntellisenseProperty
DependencyProperty for EnableIntellisense
Declaration
public static readonly DependencyProperty EnableIntellisenseProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
EnableOutliningProperty
DependencyProperty for EnableOutlining
Declaration
public static readonly DependencyProperty EnableOutliningProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
EnterKeyBehaviorProperty
Declaration
public static readonly DependencyProperty EnterKeyBehaviorProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
FindResultsTabHeightProperty
DependencyProperty for FindResultsTabHeight
Declaration
public static readonly DependencyProperty FindResultsTabHeightProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
FindResultsTabVisibilityProperty
DependencyProperty for FindResultsTabVisibility
Declaration
public static readonly DependencyProperty FindResultsTabVisibilityProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
HorizontalScrollBarVisibilityProperty
DependencyProperty for HorizontalScrollBarVisibility
Declaration
public static readonly DependencyProperty HorizontalScrollBarVisibilityProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IndentingOptionsProperty
DependencyProperty for IndentingOptions Property
Declaration
public static readonly DependencyProperty IndentingOptionsProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IntellisenseBoxStyleProperty
DependencyProperty for IntellisenseBoxStyle
Declaration
public static readonly DependencyProperty IntellisenseBoxStyleProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IntellisenseCustomItemsSourceProperty
DependencyProperty for IntellisenseCustomItemsSource
Declaration
public static readonly DependencyProperty IntellisenseCustomItemsSourceProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IntellisenseItemTemplateProperty
DependencyProperty for IntellisenseItemTemplate
Declaration
public static readonly DependencyProperty IntellisenseItemTemplateProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IntellisenseModeProperty
DependencyProperty for IntellisenseMode
Declaration
public static readonly DependencyProperty IntellisenseModeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IntellisensePopupHeightProperty
DependencyProperty for IntellisensePopupHeight
Declaration
public static readonly DependencyProperty IntellisensePopupHeightProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IntellisensePopupWidthProperty
DependencyProperty for IntellisensePopupWidth
Declaration
public static readonly DependencyProperty IntellisensePopupWidthProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsAutoIndentationEnabledProperty
DependencyProperty for IsAutoIndentationEnabled Property
Declaration
public static readonly DependencyProperty IsAutoIndentationEnabledProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsAutoLineNumberAreaWidthEnabledProperty
DependencyProperty for IsAutoLineNumberAreaWidthEnabled Property
Declaration
public static readonly DependencyProperty IsAutoLineNumberAreaWidthEnabledProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsFindResultsTabClosedProperty
DependencyProperty for IsFindResultsTabClosed
Declaration
public static readonly DependencyProperty IsFindResultsTabClosedProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsMultiLineProperty
DependencyProperty for IsMultiLine Property in EditControl
Declaration
public static readonly DependencyProperty IsMultiLineProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsReadOnlyProperty
DependencyProperty for IsReadOnly
Declaration
public static readonly DependencyProperty IsReadOnlyProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsRedoEnabledProperty
DependencyProperty for IsRedoEnabledProperty
Declaration
public static readonly DependencyProperty IsRedoEnabledProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsSelectionForegroundEnabledProperty
DependencyProperty for IsSelectionForegroundEnabled Property
Declaration
public static readonly DependencyProperty IsSelectionForegroundEnabledProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsTrackChangesEnabledProperty
DependencyProperty for IsTrackChangesEnabled Property
Declaration
public static readonly DependencyProperty IsTrackChangesEnabledProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsUndoEnabledProperty
DependencyProperty for IsUndoEnabledProperty
Declaration
public static readonly DependencyProperty IsUndoEnabledProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LineHeightProperty
DependencyProperty for LineHeight
Declaration
public static readonly DependencyProperty LineHeightProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LineNumberAreaBackgroundProperty
DependencyProperty for LineNumberAreaBackground Property
Declaration
public static readonly DependencyProperty LineNumberAreaBackgroundProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LineNumberAreaWidthProperty
DependencyProperty for LineNumberAreaBackground Property
Declaration
public static readonly DependencyProperty LineNumberAreaWidthProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LineNumberTextForegroundProperty
DependencyProperty for LineNumberTextForeground Property
Declaration
public static readonly DependencyProperty LineNumberTextForegroundProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ModifiedLineIndicatorBrushProperty
DependencyProperty for ModifiedLineIndicatorBrush Property
Declaration
public static readonly DependencyProperty ModifiedLineIndicatorBrushProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
OutliningAreaBackgroundProperty
DependencyProperty for OutliningAreaBackground Property
Declaration
public static readonly DependencyProperty OutliningAreaBackgroundProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
OutliningAreaWidthProperty
DependencyProperty for OutliningAreaWidth Property
Declaration
public static readonly DependencyProperty OutliningAreaWidthProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
PrintSettingsProperty
Stores the cref="Syncfusion.Windows.Edit.PrintSettings"/>
Declaration
public static readonly DependencyProperty PrintSettingsProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Remarks
The identifier for the Syncfusion.Windows.Edit.PrintSettings dependency property.
SavedLineIndicatorBrushProperty
DependencyProperty for SavedLineIndicatorBrush Property
Declaration
public static readonly DependencyProperty SavedLineIndicatorBrushProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SelectedTextPointerProperty
Using a DependencyProperty as the backing store for SelectedTextPointer. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectedTextPointerProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SelectedTextProperty
DependencyProperty for SelectedTextProperty
Declaration
public static readonly DependencyProperty SelectedTextProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SelectionBackgroundProperty
DependencyProperty for SelectionBackground Property
Declaration
public static readonly DependencyProperty SelectionBackgroundProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SelectionChangedEvent
Bubbled RoutedEvent Identifies the SelectionChanged.
Declaration
public static readonly RoutedEvent SelectionChangedEvent
Field Value
Type |
---|
System.Windows.RoutedEvent |
SelectionForegroundProperty
DependencyProperty for SelectionForeground Property
Declaration
public static readonly DependencyProperty SelectionForegroundProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ShowBlockIndicatorLineProperty
DependencyProperty for ShowBlockIndicatorLine Property
Declaration
public static readonly DependencyProperty ShowBlockIndicatorLineProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ShowDefaultContextMenuProperty
DependencyProperty for ShowDefaultContextMenu
Declaration
public static readonly DependencyProperty ShowDefaultContextMenuProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ShowFindAndReplaceProperty
DependencyProperty for ShowFindAndReplace
Declaration
public static readonly DependencyProperty ShowFindAndReplaceProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ShowLineNumberProperty
DependencyProperty for ShowLineNumber
Declaration
public static readonly DependencyProperty ShowLineNumberProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
ShowOutliningProperty
DependencyProperty for ShowOutlining
Declaration
public static readonly DependencyProperty ShowOutliningProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
TabKeyBehaviorProperty
Declaration
public static readonly DependencyProperty TabKeyBehaviorProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
TabSpacesProperty
DependencyProperty for TabSpacesProperty
Declaration
public static readonly DependencyProperty TabSpacesProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
TextProperty
DependencyProperty for Text
Declaration
public static readonly DependencyProperty TextProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
VerticalScrollBarVisibilityProperty
DependencyProperty for VerticalScrollBarVisibility
Declaration
public static readonly DependencyProperty VerticalScrollBarVisibilityProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Properties
AcceptsReturn
Gets / Sets whether to add the new line when enter key pressed.
Declaration
public bool AcceptsReturn { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true New line will be added. falseNew line will not be added |
AcceptsTab
Gets or sets a value indicating whether this instance of EditControl accepts tab key in the content.
Declaration
public bool AcceptsTab { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the control has to add additional spaces based on TabSpaces property; otherwise, false to move the focus to next focusable control. |
Remarks
XAML
<EditControl x:Name="editControl1" AcceptsTab="True"/>
C#
editControl1.AcceptsTab=false;
By default Accepts Tab property is set to true.
See Also
ActualLineNumberAreaWidth
Gets the actual width of line number area irrespective of IsAutoLineNumberAreaWidthEnabled.
Declaration
public double ActualLineNumberAreaWidth { get; }
Property Value
Type |
---|
System.Double |
AllowDragDrop
Gets or sets indicating whether allow to drag text or not.
Declaration
public bool AllowDragDrop { get; set; }
Property Value
Type |
---|
System.Boolean |
AssemblyReferences
Gets or sets a collection of Uri specifying the prebuilt assemblies that can be used by the EditControl to display Classes, Properties, Events and Methods in the Auto intellisense mode.
Declaration
public IEnumerable<Uri> AssemblyReferences { get; set; }
Property Value
Type |
---|
System.Collections.Generic.IEnumerable<System.Uri> |
Remarks
List<Uri> uriList = new List<Uri>();
uriList.Add(new Uri("C:\Assemblies\Syncfusion.Edit.WPF.dll",UriKind.Absolute));
uriList.Add(new Uri("C:\Assemblies\Syncfusion.Shared.WPF.dll",UriKind.Absolute));
editControl1.AssemblyReferences = uriList;
BlockIndicatorLineStroke
Gets or sets to applied to the vertical line in the expand or collapse area.
Declaration
public Brush BlockIndicatorLineStroke { get; set; }
Property Value
Type |
---|
System.Windows.Media.Brush |
Remarks
XAML
<syncfusion:EditControl x:Name="editControl1" BlockIndicatorLineStroke="Red"/>
C#
editControl1.BlockIndicatorLineStroke = Brushes.Green;
BlockIndicatorLineThickness
Gets or sets the thickness of the line in the expand collapse area of EditControl.
Declaration
public double BlockIndicatorLineThickness { get; set; }
Property Value
Type |
---|
System.Double |
Remarks
XAML
<syncfusion:EditControl x:Name="editControl1" BlockIndicatorLineThickness="2"/>
C#
editControl1.BlockIndicatorLineThickness=1d;
CaretBrush
Gets or sets the Brush to be applied for Cursor.
Declaration
public Brush CaretBrush { get; set; }
Property Value
Type |
---|
System.Windows.Media.Brush |
Remarks
XAML
<syncfusion:EditControl x:Name="editControl1" CaretBrush="Red"/>
C#
editControl1.CaretBrush = Brushes.Green;
ChangesIndicatorWidth
Gets or sets the Width of the changes indicator.
Declaration
public double ChangesIndicatorWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | By default, its value is set to 4. |
Remarks
XAML
<syncfusion:EditControl x:Name="editControl1" ChangesIndicatorWidth="10"/>
C#
editControl1.ChangesIndicatorWidth = 3d;
CollapsedTextForeground
Gets or sets foreground brush value for ellipsis text and border.
Declaration
public Brush CollapsedTextForeground { get; set; }
Property Value
Type |
---|
System.Windows.Media.Brush |
CurrentLanguage
Gets an instance of LanguageBase based on the DocumentLanguage property.
Declaration
public LanguageBase CurrentLanguage { get; }
Property Value
Type |
---|
LanguageBase |
CursorIndex
Gets current index of text where the cursor is located in EditControl pane.
Declaration
public int CursorIndex { get; }
Property Value
Type |
---|
System.Int32 |
Remarks
CursorIndex returns the caret index.
Examples
// Initializing EditControl and assigning the index of the text where the cursor is located.
EditControl editControl1 = new EditControl();
int index = editControl1.CursorIndex;
CustomLanguage
Gets or sets an instance of LanguageBase type indicating the custom language.
Declaration
public LanguageBase CustomLanguage { get; set; }
Property Value
Type |
---|
LanguageBase |
See Also
DocumentLanguage
Gets or sets Language for the text in EditControl. Syntax highlighting and outlining of text in EditControl are performed based on the language set using this property.
Declaration
public Languages DocumentLanguage { get; set; }
Property Value
Type | Description |
---|---|
Languages | Type: Languages |
Remarks
Specifies the Document language.
Examples
<syncfusion:EditControl x:Name = "editControl1" DocumentLanguage = "CSharp">
</syncfsuion:EditControl>
// Initializing EditControl and assigning the language for the text.
EditControl editControl1 = new EditControl();
editControl1.DocumentLanguage = Languages.VisualBasic;
DocumentSource
Gets or sets source for EditControl. The filename specified will be loaded in the EditControl.
Declaration
public string DocumentSource { get; set; }
Property Value
Type |
---|
System.String |
Remarks
Document Source of the EditControl.
Examples
<syncfusion:EditControl x:Name = "editControl1" DocumentSource = ""C:\test.txt" >
</syncfsuion:EditControl>
// Initializing EditControl and assigning the file to be loaded.
EditControl editControl1 = new EditControl();
editControl1.DocumentSource = ""C:\test.txt"";
EnableIntellisense
Gets or sets a value indicating whether Intellisense is enabled in this instance of EditControl .
Declaration
public bool EnableIntellisense { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if this instance support intellisense; otherwise, false. |
Remarks
XAML
<EditControl x:Name="editControl1" EnableIntellisense="True"/>
C#
editControl1.EnableIntellisense=false;
EnableOutlining
Gets or sets a value indicating whether Outlining of text in EditControl should be applied.
Declaration
public bool EnableOutlining { get; set; }
Property Value
Type |
---|
System.Boolean |
Remarks
EnableOutlining property enables the outlining of text in EditControl. It set True if outlining of the text in EditControl to be enabled ; otherwise, false. By default, it is set to true.
Examples
<syncfusion:EditControl x:Name = "editControl1" EnableOutLining = "false" >
</syncfsuion:EditControl>
// Initializing EditControl and indicating whether outlining of the text is applied.
EditControl editControl1 = new EditControl();
editControl1.EnableOutLining = false;
EnterKeyBehavior
Declaration
public EnterKeyBehavior EnterKeyBehavior { get; set; }
Property Value
Type |
---|
EnterKeyBehavior |
FindOptions
Gets or sets a instance of FindOptions indicating the options selected in the FindReplace Window.
Declaration
public FindOptions FindOptions { get; set; }
Property Value
Type |
---|
FindOptions |
FindReplaceWindow
FindReplaceWindow readonly property
Declaration
public Window FindReplaceWindow { get; }
Property Value
Type |
---|
System.Windows.Window |
FindResultsTabHeight
Gets or sets a value indicating desired height of the find results tab..
Declaration
public double FindResultsTabHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | System.Double |
Remarks
XAML
<EditControl x:Name="editControl1" FindResultsTabHeight="200"/>
C#
editControl1.FindResultsTabHeight="150";
By default, this property has a value of 150.
See Also
FindResultsTabVisibility
Gets or sets a value indicating the Visibility mode of the find results tab.
Declaration
public TabVisibility FindResultsTabVisibility { get; set; }
Property Value
Type | Description |
---|---|
TabVisibility |
Remarks
XAML
<EditControl x:Name="editControl" FindResultsTabVisibility="Visible"/>
C#
editControl1.FindResultsTabVisibility = TabVisibility.Collapsed;
See Also
HorizontalScrollBarVisibility
Gets or sets a value indicating visibility of Horizontal ScrollBar in EditControl.
Declaration
public ScrollBarVisibility HorizontalScrollBarVisibility { get; set; }
Property Value
Type |
---|
System.Windows.Controls.ScrollBarVisibility |
Remarks
By default, it is set to Auto, wherein the ScrollBar will be visible when required.
Examples
<syncfusion:EditControl x:Name = "editControl1" HorizontalScrollBarVisibility = "Visible">
</syncfsuion:EditControl>
// Initializing EditControl and assigning the visibility of the horizontal scrollbar.
EditControl editControl1 = new EditControl();
editControl1.HorizontalScrollBarVisibility = ScrollBarVisibility.Visible;
IndentingOptions
Gets or sets the indenting options of the EditControl.
Declaration
public IndentingOptions IndentingOptions { get; set; }
Property Value
Type |
---|
IndentingOptions |
Remarks
Supports three types of indentations and Smart indenting options is set as default value for this property.
IntellisenseBoxStyle
Gets or sets a Style to be applied to a IntellisenseBox.
Declaration
public Style IntellisenseBoxStyle { get; set; }
Property Value
Type |
---|
System.Windows.Style |
IntellisenseCustomItemsSource
Gets or sets a collection of Business object inherited from IIntellisenseItem to be dispalyed in the IntellisenseBox.
Declaration
public IEnumerable IntellisenseCustomItemsSource { get; set; }
Property Value
Type |
---|
System.Collections.IEnumerable |
IntellisenseItemTemplate
Gets or sets a DataTemplate to be applied to a IntellisenseBox.
Declaration
public DataTemplate IntellisenseItemTemplate { get; set; }
Property Value
Type |
---|
System.Windows.DataTemplate |
IntellisenseMode
Gets or sets a value indicating the intellisense mode. It supports two modes viz, Auto and Custom. In Auto mode, intellisense items are auto generated based on the language lexems, assembly references included. Where as in the Custom mode, users have to set the IntellisenseCustomItemsSource property to specify the items to be displayed in the intellisense.
Declaration
public IntellisenseMode IntellisenseMode { get; set; }
Property Value
Type |
---|
IntellisenseMode |
Remarks
XAML
<EditControl x:Name="editControl1" IntellisenseMode="Auto"/>
C#
editControl1.IntellisenseMode = IntellisenseMode.Custom;
See Also
IntellisensePopupHeight
Gets or sets a value indicating desired height of the Intellisense popup..
Declaration
public double IntellisensePopupHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Double | System.Double |
Remarks
XAML
<EditControl x:Name="editControl1" IntellisensePopupHeight="200"/>
C#
editControl1.IntellisensePopupHeight="150";
By default, this property has a value of 150.
IntellisensePopupWidth
Gets or sets a value indicating desired width of Intellisense Popup.
Declaration
public double IntellisensePopupWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | System.Double |
Remarks
XAML
<EditControl x:Name="editControl1" IntellisensePopupWidth="200"/>
C#
editControl1.IntellisensePopupWidth="150";
By default, this property has a value of 150.
IsAutoIndentationEnabled
Gets or sets a value indicating whether this auto indentation is supported or not.
Declaration
public bool IsAutoIndentationEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if this instance supports auto indentation; otherwise, false. |
IsAutoLineNumberAreaWidthEnabled
Gets or sets a value indicating whether the width of the line number area has to be calculated automatically based on the number of lines.
Declaration
public bool IsAutoLineNumberAreaWidthEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if this instance has to calculate the line number area width; otherwise, false. |
Remarks
XAML
<syncfusion:EditControl x:Name="editControl1" IsAutoLineNumberAreaWidthEnabled="False"/>
C#
editControl1.IsAutoLineNumberAreaWidthEnabled = false;
IsFindResultsTabClosed
Gets or sets a value indicating whether the Find Results Tab is closed or not .
Declaration
public bool IsFindResultsTabClosed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the find results tab in the EditControl is closed; otherwise, false. |
IsMultiLine
Get or sets a value indicating whether the IsMultiLine is enabled or not in EditControl .
Declaration
public bool IsMultiLine { get; set; }
Property Value
Type |
---|
System.Boolean |
IsReadOnly
Gets or sets a value indicating whether read only mode is enabled or not in EditControl.
Declaration
public bool IsReadOnly { get; set; }
Property Value
Type |
---|
System.Boolean |
Remarks
Set True if this read only has to be enabled; otherwise, false. By default, it is set to false.
Examples
<syncfusion:EditControl x:Name = "editControl1" IsReadOnly = "true">
</syncfsuion:EditControl>
// Initializing EditControl and indicating whether the read only mode is enabled or not.
EditControl editControl1 = new EditControl();
editControl1.IsReadOnly = true;
IsRedoEnabled
Gets or sets a value indicating whether this instance supports Redo operation or not.
Declaration
public bool IsRedoEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if this instance allows undo operations to be performed ; otherwise, false. |
Remarks
XAML
<EditControl x:Name="editControl1" IsRedoEnabled="True"/>
C#
EditControl editControl1 = new EditControl();
editControl1.IsRedoEnabled = true;
See Also
IsSelectionForegroundEnabled
Gets or sets a value indicating whether this instance will apply foreground for selected text using SelectionForeground property.
Declaration
public bool IsSelectionForegroundEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if this instance show apply SelectionForeground to selected; otherwise, false. |
Remarks
XAML
<syncfusion:EditControl x:Name="editControl1" IsSelectionForegroundEnabled="False"/>
C#
editControl1.IsSelectionForegroundEnabled = true;
IsTrackChangesEnabled
Gets or sets a value indicating whether the changes done to the text needs to highlighted or not.
Declaration
public bool IsTrackChangesEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if this instance should highlight the changes done to the text ; otherwise, false.
By default, its value is set to true. |
Remarks
XAML
<syncfusion:EditControl x:Name="editControl1" IsTrackChangesEnabled="False"/>
C#
editControl.IsTrackChangesEnabled=true;
IsUndoEnabled
Gets or sets a value indicating whether this instance supports Undo operation or not.
Declaration
public bool IsUndoEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if this instance allows undo operations to be performed ; otherwise, false. |
Remarks
XAML
<EditControl x:Name="editControl1" IsUndoEnabled="True"/>
C#
EditControl editControl1 = new EditControl();
editControl1.IsUndoEnabled = true;
See Also
LineHeight
Gets and sets the height of each line in EditControl.
Declaration
public double LineHeight { get; }
Property Value
Type |
---|
System.Double |
Remarks
The LineHeight property specifies the line height in the EditControl.
LineNumber
Gets the line number where the cursor is currently located EditControl.
Declaration
public int LineNumber { get; }
Property Value
Type |
---|
System.Int32 |
Remarks
LineNumber property returns the current line number.
Examples
// Initializing EditControl and assigning the line number where the cursor is currently located.
EditControl editControl1 = new EditControl();
int index = editControl1.LineNumber;
LineNumberAreaBackground
Gets or sets a Brush value that is applied as background of LineNumberArea.
Declaration
public Brush LineNumberAreaBackground { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | By default, its value is set to Brushes.WhiteSmoke. |
Remarks
XAML
<syncfusion:EditControl x:Name="editControl1" LineNumberAreaBackground="LightGreen"/>
C#
editControl1.LineNumberAreaBackground=Brushes.Yellow;
LineNumberAreaWidth
Gets or sets a value indicating the Width of the line number area. This width gets applied only when IsAutoLineNumberAreaWidthEnabled property is set to false.
Declaration
public double LineNumberAreaWidth { get; set; }
Property Value
Type |
---|
System.Double |
Remarks
XAML
<syncfusion:EditControl x:Name="editControl1" LineNumberAreaWidth="50"/>
C#
editControl1.LineNumberAreaWidth = 40d;
LineNumberTextForeground
Gets or sets line number text foreground.
Declaration
public Brush LineNumberTextForeground { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | By Default, this property value is set to Black |
Remarks
XAML
<syncfusion:EditControl x:Name="editControl1" LineNumberTextForeground="Yellow"/>
C#
editControl1.LineNumberTextForeground = Brushes.Green;
Lines
Gets the collection of lines in EditControl.
Declaration
public LineItemsCollection Lines { get; }
Property Value
Type |
---|
LineItemsCollection |
ModifiedLineIndicatorBrush
Gets or sets the Brush to be applied to changes indicator for a modified line that has not yet been saved.
Declaration
public Brush ModifiedLineIndicatorBrush { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | By default, its value is set to Brushes.Yellow |
Remarks
XAML
<syncfusion:EditControl x:Name="editControl1" ModifiedLineIndicatorBrush="CadetBlue"/>
C#
editControl1.ModifiedLineIndicatorBrush = Brushes.Magenta;
OutliningAreaBackground
Gets or sets the background Brush to be applied to outlining (expand collapse) area.
Declaration
public Brush OutliningAreaBackground { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | By default, its value is set to Brushes.Transparent. |
Remarks
XAML
<syncfusion:EditControl x:Name="editControl1" OutliningAreaBackground="LightBlue"/>
C#
editControl1.OutliningAreaBackground=Brushes.Yellow;
OutliningAreaWidth
Gets or sets width of the outlining (expand collapse) area.
Declaration
public double OutliningAreaWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | By default, its value is set to 20. |
Remarks
XAML
<syncfusion:EditControl x:Name="editControl1" OutliningAreaWidth="40"/>
C#
editControl1.OutliningAreaWidth = 50d;
PrintSettings
Gets or sets the cref="Syncfusion.Windows.Edit.PrintSettings"/>
Declaration
public PrintSettings PrintSettings { get; set; }
Property Value
Type |
---|
PrintSettings |
SavedLineIndicatorBrush
Gets or sets the Brush to be applied in the changes indicator for saved line.
Declaration
public Brush SavedLineIndicatorBrush { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | By default, its value is set to LightGreen. |
Remarks
XAML
<syncfusion:EditControl x:Name="editControl1" SavedLineIndicatorBrush="CadetBlue"/>
C#
editControl1.SavedLineIndicatorBrush = Brushes.Magenta;
SearchResults
Get or sets a value indicating the Search results.
Declaration
public SearchResult SearchResults { get; set; }
Property Value
Type |
---|
SearchResult |
SelectedText
Gets a value indicating the selected text of EditControl.
Declaration
public string SelectedText { get; }
Property Value
Type |
---|
System.String |
Remarks
It is readonly property
Examples
<syncfusion:EditControl x:Name = "editControl1">
</syncfsuion:EditControl>
<TextBox x:Name = "textBox1" Text = "{Binding ElementName = editControl1, Path = SelectedText}">
</TextBox>
// Initializing EditControl and assigning the selected text.
EditControl editControl1 = new EditControl();
textBox1.Text = editControl1.SelectedText;
SelectedTextPointer
Gets or Sets the Selection text pointer
Declaration
public SelectionPointer SelectedTextPointer { get; set; }
Property Value
Type |
---|
SelectionPointer |
SelectionBackground
Gets or sets background brush for selected text.
Declaration
public Brush SelectionBackground { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | By default, this property is set to DodgerBlue SolidColorBrush. |
Remarks
XAML
<syncfusion:EditControl x:Name="editControl1" SelectionBackground="DarkGray"/>
C#
editControl1.SelectionBackground = Brushes.DodgerBlue;
SelectionForeground
Gets or sets text foreground for selected text.
Declaration
public Brush SelectionForeground { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Media.Brush | By Default, this property value is set to White. This brush value gets applied when IsSelectionForegroundEnabled property is set to true else, text foreground for selected text will be applied from default text foreground or based on syntax highlighting colors. |
Remarks
XAML
<syncfusion:EditControl x:Name="editControl1" SelectionForeground="Yellow"/>
C#
editControl1.SelectionForeground = Brushes.Green;
ShowBlockIndicatorLine
Gets or sets a value indicating whether the vertical line in the expand collapse area should be displayed or not.
Declaration
public bool ShowBlockIndicatorLine { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the vertical line has to be displayed; otherwise, false. |
Remarks
XAML
<syncfusion:EditControl x:Name="editControl1" ShowBlockIndicatorLine="False"/>
C#
editControl1.ShowBlockIndicatorLine = true;
ShowDefaultContextMenu
Gets or sets a value indicating whether built-in context menu should be displayed in EditControl.
Declaration
public bool ShowDefaultContextMenu { get; set; }
Property Value
Type |
---|
System.Boolean |
Remarks
ShowDefaultContextMenu sets True if built-in context menu has to be displayed; otherwise, false. By default, it is set to true.
Examples
<syncfusion:EditControl x:Name = "editControl1" ShowDefaultContextMenu = "false" >
</syncfsuion:EditControl>
// Initializing EditControl and indicating whether built-in context menu should be displayed or not.
EditControl editControl1 = new EditControl();
editControl1.ShowDefaultContextMenu = false;
ShowFindAndReplace
Get or set a value indicating whether Find And Replace Window has to be shown or not in EditControl
Declaration
public bool ShowFindAndReplace { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Set True if Find And Replace window has to be displayed; otherwise, False. By default, it is set to True. |
Examples
<syncfusion:EditControl x:Name = "editControl1" ShowFindAndReplace = "true">
</syncfsuion:EditControl>
// Initializing EditControl and check whether find and replace window has been shown or not.
EditControl editControl1 = new EditControl();
editControl1.ShowFindAndReplace = true;
ShowLineNumber
Gets or sets a value indicating whether line number to be displayed or not in EditControl.
Declaration
public bool ShowLineNumber { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Set True if Line number has to be displayed; otherwise, false. By default it is set to true. |
Remarks
ShowLineNumber property checks the Line number visibility.
Examples
<syncfusion:EditControl x:Name = "editControl1" ShowLineNumber = "false" >
</syncfsuion:EditControl>
// Initializing EditControl and indicating whether to display line number or not.
EditControl editControl1 = new EditControl();
editControl1.ShowLineNumber = false;
ShowOutlining
Gets or sets a value indicating whether Hidden or Visible displayed.
Declaration
public Visibility ShowOutlining { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Visibility | Set Visible if built-in context menu has to be displayed; otherwise, Hidden. By default, it is set to Visible. |
Remarks
ShowOutlining property returns the System.Windows.Visibility mode of outlining.
Examples
<syncfusion:EditControl x:Name = "editControl1" ShowOutlining = "Visible">
</syncfsuion:EditControl>
// Initializing EditControl and checking the visibility of the outline in the editcontrol.
EditControl editControl1 = new EditControl();
editControl1.ShowOutlining = Visible;
StatusBarSettings
Gets and sets the properties declared in StatusBarSettings Class File
Declaration
public StatusBarSettings StatusBarSettings { get; set; }
Property Value
Type |
---|
StatusBarSettings |
TabKeyBehavior
Gets or sets the Tab Key behavior in EditControl. Insert the space on pressing the Tab key if TabKeyBehavior is InsertSpace. Insert the Tab, if TabKeyBehavior is InsertTab.
Declaration
public TabKeyBehavior TabKeyBehavior { get; set; }
Property Value
Type |
---|
TabKeyBehavior |
TabSpaces
Gets or sets a value indicating the number of spaces to included when the tab key is pressed.
Declaration
public int TabSpaces { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | System.Int |
Remarks
By default, its value is set to 5.
See Also
Text
Gets or sets a value indicating text in EditControl.
Declaration
public string Text { get; set; }
Property Value
Type |
---|
System.String |
Remarks
By default, it is set to string.Empty.
Examples
<syncfusion:EditControl x:Name = "editControl1" Text = "setting the text property">
</syncfsuion:EditControl>
// Initializing EditControl and assigning the text value.
EditControl editControl1 = new EditControl();
editControl1.Text = "setting the text property";
VerticalScrollBarVisibility
Gets or sets a value indicating visibility of Vertical ScrollBar in EditControl.
Declaration
public ScrollBarVisibility VerticalScrollBarVisibility { get; set; }
Property Value
Type |
---|
System.Windows.Controls.ScrollBarVisibility |
Remarks
By default, it is set to Auto, wherein the ScrollBar will be visible when required.
Examples
<syncfusion:EditControl x:Name = "editControl1" VerticalScrollBarVisibility = "Visible">
</syncfsuion:EditControl>
// Initializing EditControl and assigning the visibility of the vertical scrollbar.
EditControl editControl1 = new EditControl();
editControl1.VerticalScrollBarVisibility = ScrollBarVisibility.Visible;
Methods
add_CaretPositionChanged(EventHandler<CaretPositionEventArgs>)
Declaration
public void add_CaretPositionChanged(EventHandler<CaretPositionEventArgs> value)
Parameters
Type | Name | Description |
---|---|---|
EventHandler<CaretPositionEventArgs> | value |
add_DocumentClosing(EventHandler<DocumentClosingEventArgs>)
Declaration
public void add_DocumentClosing(EventHandler<DocumentClosingEventArgs> value)
Parameters
Type | Name | Description |
---|---|---|
EventHandler<DocumentClosingEventArgs> | value |
add_IntellisenseBoxOpening(IntellisenseBoxEventHandler)
Declaration
public void add_IntellisenseBoxOpening(IntellisenseBoxEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
IntellisenseBoxEventHandler | value |
add_IntellisenseDrillDown(IntellisenseBoxEventHandler)
Declaration
public void add_IntellisenseDrillDown(IntellisenseBoxEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
IntellisenseBoxEventHandler | value |
add_OnBeforeLineRender(OnBeforeLineRenderEventHandler)
Declaration
public void add_OnBeforeLineRender(OnBeforeLineRenderEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
OnBeforeLineRenderEventHandler | value |
AppendText(String)
Appends the text at the end of the EditControl.
Declaration
public void AppendText(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | Text to be appended. |
BeginAssemblyInit()
A method to specify that the adding or removing assemblies to the Assembly references property has been started.
Declaration
public void BeginAssemblyInit()
ClearAllText()
Declaration
public void ClearAllText()
Dispose()
Method to clear the unused objects
Declaration
public void Dispose()
EndAssemblyInit()
A method to specify that the adding or removing assemblies to the Assembly references property has been completed.
Declaration
public void EndAssemblyInit()
ExecuteFindAll()
Finds all the occurrences of the FindText specified in FindOptions and displays the list of occurences in the Find Symbol Results tab in EditControl.
Declaration
public void ExecuteFindAll()
Remarks
FindOptions property of the EditControl can be used to set the Find related parameters
ExecuteFindNext()
Finds the next occurrence of FindText specified in FindOptions
Declaration
public void ExecuteFindNext()
Remarks
FindOptions property of the EditControl can be used to set the Find related parameters
ExecuteReplace()
Replaces the immediate occurrence of FindText specified in FindOptions with ReplaceText
Declaration
public void ExecuteReplace()
Remarks
FindOptions property of the EditControl can be used to set the Find related parameters
ExecuteReplaceAll()
Replaces all the occurrences of the FindText specified in FindOptions with ReplaceText
Declaration
public void ExecuteReplaceAll()
Remarks
FindOptions property of the EditControl can be used to set the Find related parameters
ExpandLine(Int32)
ExpandLine method
Declaration
public void ExpandLine(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
ExpandLineUpTopLevel(Int32)
ExpandLineUpTopLevel method
Declaration
public void ExpandLineUpTopLevel(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
FindAllOccurences()
Finds all the occurrences of FindText specified in FindOptions. Results can be obtained using SearchResults.FindAllResult property of EditControl class
Declaration
public void FindAllOccurences()
Remarks
FindOptions property of the EditControl can be used to set the Find related parameters
FindAllOccurrences()
Finds all the occurrences of FindText specified in FindOptions. Results can be obtained using SearchResults.FindAllResult property of EditControl class
Declaration
public void FindAllOccurrences()
Remarks
FindOptions property of the EditControl can be used to set the Find related parameters
GetTextRange(Int32, Int32)
Helper method that returns the text in the control with in start and end index
Declaration
public string GetTextRange(int start, int end)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | start | |
System.Int32 | end |
Returns
Type | Description |
---|---|
System.String | Returns the all text of the presenter |
GoToLine(Int32)
Go to the Select line
Declaration
public void GoToLine(int LineNumber)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | LineNumber | Selected number |
InsertText(String, Int32, Int32)
Insert the text at required location in EditControl
Declaration
public void InsertText(string text, int lineNumber, int index)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | Text to be inserted in EditControl |
System.Int32 | lineNumber | Text to be inserted on desired line |
System.Int32 | index | The index where the text has to be inserted |
LoadFile()
LoadFile method is used to open a file in the EditControl. It shows up a OpenFileDialog in order for the users to select the file to be opened using EditControl and returns a bool value stating the whether file open was successful.
Declaration
public bool LoadFile()
Returns
Type | Description |
---|---|
System.Boolean | Return true when the file loaded, otherwise return false |
Remarks
Load the specified file from the opendialog box.
Examples
// Initializing EditControl and loading the file
EditControl editControl1 = new EditControl();
editControl1.LoadFile();
LoadFile(String)
This method does not display OpenFileDialog and loads the file specified as the parameter of the method in EditControl. It returns a bool value stating the file open was successful.
Declaration
public bool LoadFile(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | String type, specifies the name of the file to be loaded. |
Returns
Type | Description |
---|---|
System.Boolean | Returns a bool value stating the file open was successful. |
Remarks
Load the specified filename into the EditControl.
Examples
// Initializing EditControl and loading the file
EditControl editControl1 = new EditControl();
editControl1.LoadFile("C:\test.txt");
MoveToLineEnd()
Moves the cursor to an end position of current LineItem in EditControl.
Declaration
public void MoveToLineEnd()
MoveToLineStart()
Moves the cursor to a start position of current LineItem in EditControl.
Declaration
public void MoveToLineStart()
MoveToNextIndex()
Moves the cursor to a position forward in current LineItem of EditControl.
Declaration
public void MoveToNextIndex()
MoveToNextLine()
Moves the cursor to the same position on the next LineItem in EditControl.
Declaration
public void MoveToNextLine()
MoveToNextWord()
Moves the cursor to the start position of the next word in EditControl.
Declaration
public void MoveToNextWord()
MoveToPreviousIndex()
Moves the cursor to a position backward in current LineItem of EditControl.
Declaration
public void MoveToPreviousIndex()
MoveToPreviousLine()
Moves the cursor to the same position on the previous LineItem in EditControl.
Declaration
public void MoveToPreviousLine()
MoveToPreviousWord()
Moves the cursor to the start position of the previous word in EditControl.
Declaration
public void MoveToPreviousWord()
OnApplyTemplate()
This method gets called when the control template is applied
Declaration
public override void OnApplyTemplate()
OnContextMenuOpening(ContextMenuEventArgs)
ContextMenuOpening override event to restrict displaying context menu in the linenumber and expand collapse region
Declaration
protected override void OnContextMenuOpening(ContextMenuEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Controls.ContextMenuEventArgs | e |
OnCreateAutomationPeer()
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
Type |
---|
System.Windows.Automation.Peers.AutomationPeer |
OnFontPropertiesChanged(DependencyPropertyChangedEventArgs)
Occurs when the FontFamily and FontSize property gets changed.
Declaration
protected virtual void OnFontPropertiesChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | The System.Windows.DependencyPropertyChangedEventArgs instance containing the event data. |
OnGotFocus(RoutedEventArgs)
override to update the focus of the control when control gets Focussed.
Declaration
protected override void OnGotFocus(RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.RoutedEventArgs | e |
OnLostFocus(RoutedEventArgs)
override to update the focus of the control when control loses Focussed.
Declaration
protected override void OnLostFocus(RoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.RoutedEventArgs | e |
OnPreviewKeyDown(KeyEventArgs)
override to perform operations when key is down In this override method key inputs are captured and tab inputs are applied
Declaration
protected override void OnPreviewKeyDown(KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.KeyEventArgs | e | The System.Windows.Input.KeyEventArgs that contains the event data. |
OnPreviewKeyUp(KeyEventArgs)
override to perform operations when key is up
Declaration
protected override void OnPreviewKeyUp(KeyEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.KeyEventArgs | e | The System.Windows.Input.KeyEventArgs that contains the event data. |
OnPreviewMouseLeftButtonDown(MouseButtonEventArgs)
Invoked when Mouse Left Button Down
Declaration
protected override void OnPreviewMouseLeftButtonDown(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseButtonEventArgs | e | The Mouse Button Event Args |
OnPreviewMouseRightButtonDown(MouseButtonEventArgs)
Invoked when Mouse Right Button Down
Declaration
protected override void OnPreviewMouseRightButtonDown(MouseButtonEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.MouseButtonEventArgs | e | The Mouse Button Event Args |
OnSelectedTextChanged(DependencyPropertyChangedEventArgs)
Occurs when the SelectedText property gets changed.
Declaration
protected virtual void OnSelectedTextChanged(DependencyPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | args | The System.Windows.DependencyPropertyChangedEventArgs instance containing the event data. |
OnSourceChanged(DependencyPropertyChangedEventArgs)
Occurs when the DocumentSource property gets changed.
Declaration
protected virtual void OnSourceChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | The System.Windows.DependencyPropertyChangedEventArgs instance containing the event data. |
OnTextInput(TextCompositionEventArgs)
Override to perform operations when text is entered in the control. In this override, Text input is captured and operations are performed based on the text input.
Declaration
protected override void OnTextInput(TextCompositionEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Input.TextCompositionEventArgs | e | The System.Windows.Input.TextCompositionEventArgs that contains the event data. |
Print()
Print the EditControl content based on its PrintSettings.
Declaration
public void Print()
RegisterUnderlineFormat(Brush, UnderlineStyle)
Register the Under line format
Declaration
public ISnippetFormat RegisterUnderlineFormat(Brush color, UnderlineStyle style)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Media.Brush | color | |
UnderlineStyle | style |
Returns
Type |
---|
ISnippetFormat |
remove_CaretPositionChanged(EventHandler<CaretPositionEventArgs>)
Declaration
public void remove_CaretPositionChanged(EventHandler<CaretPositionEventArgs> value)
Parameters
Type | Name | Description |
---|---|---|
EventHandler<CaretPositionEventArgs> | value |
remove_DocumentClosing(EventHandler<DocumentClosingEventArgs>)
Declaration
public void remove_DocumentClosing(EventHandler<DocumentClosingEventArgs> value)
Parameters
Type | Name | Description |
---|---|---|
EventHandler<DocumentClosingEventArgs> | value |
remove_IntellisenseBoxOpening(IntellisenseBoxEventHandler)
Declaration
public void remove_IntellisenseBoxOpening(IntellisenseBoxEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
IntellisenseBoxEventHandler | value |
remove_IntellisenseDrillDown(IntellisenseBoxEventHandler)
Declaration
public void remove_IntellisenseDrillDown(IntellisenseBoxEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
IntellisenseBoxEventHandler | value |
remove_OnBeforeLineRender(OnBeforeLineRenderEventHandler)
Declaration
public void remove_OnBeforeLineRender(OnBeforeLineRenderEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
OnBeforeLineRenderEventHandler | value |
RemoveUnderLine(SelectionPointer)
Remove Under line for the pointer
Declaration
public void RemoveUnderLine(SelectionPointer pointer)
Parameters
Type | Name | Description |
---|---|---|
SelectionPointer | pointer |
ResetLineBackground(Int32)
To reset the Line Background.
Declaration
public void ResetLineBackground(int lineNumber)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | lineNumber | To specify the Line Number to reset to default Background. |
SaveFile()
Save method is used to save the text in the EditControl under a file name with different supported file types.
Declaration
public bool SaveFile()
Returns
Type | Description |
---|---|
System.Boolean | Returns true when Save Dialog box opened otherwise return false |
Remarks
When Save method is called a SaveFileDialog method is displayed in order for the users to provide the file name and select target locations.
Examples
// Initializing EditControl and saving the file
EditControl editControl1 = new EditControl();
editControl1.LoadFile();
SaveFile(String)
Save method is used to save the text in the EditControl under the file name specified
Declaration
public bool SaveFile(string FileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | FileName | represents the file name under which the text needs to be saved. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true when Save Dialog box opened otherwise return false |
Examples
// Initializing EditControl and saving the file
EditControl editControl1 = new EditControl();
editControl1.LoadFile("C:\test.txt");
SelectLines(Int32, Int32, Int32, Int32)
A method to select single line or multiline text with in the specified range.
Declaration
public void SelectLines(int startLine, int endLine, int startIndex, int endIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | startLine | represents the selection start line number. |
System.Int32 | endLine | represents the selection end line number |
System.Int32 | startIndex | represents the selection start index. |
System.Int32 | endIndex | represents the selection end index. |
Remarks
All the parameters are 0 based index values.
SetLineBackground(Int32, Boolean, Brush)
Set the background to a specified Line.
Declaration
public void SetLineBackground(int lineNumber, bool isFullLine, Brush backgroundColor)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | lineNumber | To specify the Line Number to be customized. |
System.Boolean | isFullLine | To specify whether to highlight Background for full line or within text limit. |
System.Windows.Media.Brush | backgroundColor |
SetUnderline(SelectionPointer, ISnippetFormat)
Set underline for the Pointer
Declaration
public void SetUnderline(SelectionPointer pointer, ISnippetFormat formatedtext)
Parameters
Type | Name | Description |
---|---|---|
SelectionPointer | pointer | |
ISnippetFormat | formatedtext |
ShowGoToLine()
Show Go To Line Window
Declaration
public void ShowGoToLine()
ShowGoToLine(Int32)
Show Go To Line
Declaration
public void ShowGoToLine(int LineNumber)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | LineNumber | navigatelinenumber |
ShowPrintPreview()
Helps to preview the EditControl content based on its PrintSettings.
Declaration
public void ShowPrintPreview()
Events
CaretPositionChanged
Occurs when the caret position changed in EditControl.
Declaration
public event EventHandler<CaretPositionEventArgs> CaretPositionChanged
Event Type
Type |
---|
EventHandler<CaretPositionEventArgs> |
Examples
EditControl editControl = new EditControl();
editControl.CaretPositionChanged += EditControl_CaretPositionChanged;
private void EditControl_CaretPositionChanged(object sender, CaretPositionEventArgs e)
{
int lineNumber = e.LineNumber;
int cursorIndex = e.CursorIndex;
}
DocumentClosing
Declaration
public event EventHandler<DocumentClosingEventArgs> DocumentClosing
Event Type
Type |
---|
EventHandler<DocumentClosingEventArgs> |
DocumentSourceChanged
Occurs when DocumentSource property gets changed.
Declaration
public event PropertyChangedCallback DocumentSourceChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
FindReplaceWindowClosed
When FindReplaceWindowClosed
Declaration
public event RoutedEventHandler FindReplaceWindowClosed
Event Type
Type |
---|
System.Windows.RoutedEventHandler |
FindReplaceWindowOpened
When FindReplaceWindowOpened
Declaration
public event RoutedEventHandler FindReplaceWindowOpened
Event Type
Type |
---|
System.Windows.RoutedEventHandler |
GoToLineWindowClosed
Occurs when the "GoToLine" window is closed in the EditControl.
Declaration
public event RoutedEventHandler GoToLineWindowClosed
Event Type
Type |
---|
System.Windows.RoutedEventHandler |
GoToLineWindowOpened
Occurs when the "GoToLine" window is opened in the EditControl.
Declaration
public event RoutedEventHandler GoToLineWindowOpened
Event Type
Type |
---|
System.Windows.RoutedEventHandler |
IntellisenseBoxClosed
Occurs while the IntellisenseBox is closed.
Declaration
public event EventHandler IntellisenseBoxClosed
Event Type
Type |
---|
System.EventHandler |
IntellisenseBoxOpening
Occurs before the IntellisenseBox is displayed.
Declaration
public event IntellisenseBoxEventHandler IntellisenseBoxOpening
Event Type
Type |
---|
IntellisenseBoxEventHandler |
IntellisenseDrillDown
Occurs when a intellisense drills down to sub -items
Declaration
public event IntellisenseBoxEventHandler IntellisenseDrillDown
Event Type
Type |
---|
IntellisenseBoxEventHandler |
OnBeforeLineRender
Occurs before applying LineBackground
Declaration
public event OnBeforeLineRenderEventHandler OnBeforeLineRender
Event Type
Type |
---|
OnBeforeLineRenderEventHandler |
SelectedTextChanged
Occurs when text in the EditControl is selected.
Declaration
public event PropertyChangedCallback SelectedTextChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
SelectionChanged
Occurs when [SelectionChanged].
Declaration
public event RoutedEventHandler SelectionChanged
Event Type
Type |
---|
System.Windows.RoutedEventHandler |
TextChanged
Occurs when text in the EditControl is gets changed.
Declaration
public event PropertyChangedCallback TextChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |