ICSharpCode.AvalonEdit.Editing.Selection.ReplaceSelectionWithText C# (CSharp) Method

ReplaceSelectionWithText() public abstract method

Replaces the selection with the specified text.
public abstract ReplaceSelectionWithText ( TextArea textArea, string newText ) : void
textArea TextArea
newText string
return void
        public abstract void ReplaceSelectionWithText(TextArea textArea, string newText);

Usage Example

Esempio n. 1
0
        internal void RemoveSelectedText()
        {
            if (this.Document == null)
            {
                throw ThrowUtil.NoDocumentAssigned();
            }
            selection.ReplaceSelectionWithText(string.Empty);

            if (!selection.IsEmpty)
            {
                foreach (ISegment s in selection.Segments)
                {
                    Debug.Assert(this.ReadOnlySectionProvider.GetDeletableSegments(s).Count() == 0);
                }
            }
        }