EditorDocument Class
Represents a text document that can be used in an editor.
public class EditorDocument : CodeDocument, INotifyPropertyChanged, IEditorDocument, ICodeDocument, IParseTarget, ITextDocument
- Inheritance:
- System.Object TextDocumentBase CodeDocument Object
- Implements:
- IEditorDocument ICodeDocument IParseTarget ITextDocument
Constructors
EditorDocument()
Initializes a new instance of the EditorDocument
class.
public EditorDocument()
Properties
IndicatorManager
Gets the IIndicatorManager that manages indicators for the document.
public IIndicatorManager IndicatorManager { get; }
Property Value
- IIndicatorManager:
The IIndicatorManager that manages indicators for the document.
LineNumberOrigin
Gets or sets the origin line number to use as the base for the first view line.
public int LineNumberOrigin { get; set; }
Property Value
- System.Int32:
The origin line number to use as the base for the first view line. The default value is
1
.
OutliningManager
Gets the IOutliningManager that manages outlining nodes for the document.
public IOutliningManager OutliningManager { get; }
Property Value
- IOutliningManager:
The IOutliningManager that manages outlining nodes for the document. The default value is
OutliningMode.Default
.
OutliningMode
Gets or sets the OutliningMode for the document that determines what type of code outlining (folding) is supported.
public OutliningMode OutliningMode { get; set; }
Property Value
- OutliningMode:
The OutliningMode for the document that determines what type of code outlining (folding) is supported.
Text
Gets or sets the text in the document.
public string Text { get; set; }
Property Value
- System.String:
The text in the document.
Remarks
This property is only intended to be used when deserializing text content from XAML.
WhitespaceTrimModes
Gets or sets the modes in which whitespace should be automatically trimmed.
public WhitespaceTrimModes WhitespaceTrimModes { get; set; }
Property Value
- WhitespaceTrimModes:
A WhitespaceTrimModes indicating the modes in which whitespace should be automatically trimmed. The default value is
None
.
Methods
GetTextReplacementInsertText(ITextChangeOperation)
Returns the scrubbed text that should be inserted for an entire text replacement ITextChangeOperation.
protected override string GetTextReplacementInsertText(ITextChangeOperation operation)
Parameter | Type | Description |
---|---|---|
operation | ITextChangeOperation | The ITextChangeOperation containing default text to insert. |
Returns
- System.String:
The text to insert.
Remarks
This method can be overridden to scrub the text to insert, such as remove trailing whitespace, etc.
Inherited Members
- CodeDocument.IParseTarget.NotifyParseComplete(IParseRequest, IParseData)
- CodeDocument.AddLanguageChangedEventHandler(EventHandler<SyntaxLanguageChangedEventArgs>, EventHandlerPriority)
- CodeDocument.CreateParseRequest()
- CodeDocument.CreateTagAggregator<T>()
- CodeDocument.GetReadOnlyRegions(TextRange)
- CodeDocument.GetServices<TService>()
- CodeDocument.NotifyParseComplete(IParseRequest, IParseData)
- CodeDocument.OnFileNameChanged(StringPropertyChangedEventArgs)
- CodeDocument.OnLanguageChanged(SyntaxLanguageChangedEventArgs)
- CodeDocument.OnParseDataChanged(ParseDataPropertyChangedEventArgs)
- CodeDocument.OnTextChanged(TextSnapshotChangedEventArgs)
- CodeDocument.QueueParseRequest()
- CodeDocument.RemoveLanguageChangedEventHandler(EventHandler<SyntaxLanguageChangedEventArgs>, EventHandlerPriority)
- CodeDocument.IParseTarget.UniqueId
- CodeDocument.Language
- CodeDocument.LanguageData
- CodeDocument.ParseData
- CodeDocument.Properties
- CodeDocument.LanguageChanged
- CodeDocument.ParseDataChanged
- TextDocumentBase.AddTextChangedEventHandler(EventHandler<TextSnapshotChangedEventArgs>, EventHandlerPriority)
- TextDocumentBase.AddTextChangingEventHandler(EventHandler<TextSnapshotChangingEventArgs>, EventHandlerPriority)
- TextDocumentBase.AppendText(ITextChangeType, String)
- TextDocumentBase.AppendText(ITextChangeType, String, ITextChangeOptions)
- TextDocumentBase.CreateTextChange(ITextChangeType)
- TextDocumentBase.CreateTextChange(ITextChangeType, ITextChangeOptions)
- TextDocumentBase.DeleteText(ITextChangeType, TextRange)
- TextDocumentBase.DeleteText(ITextChangeType, TextRange, ITextChangeOptions)
- TextDocumentBase.DeleteText(ITextChangeType, Int32, Int32)
- TextDocumentBase.DeleteText(ITextChangeType, Int32, Int32, ITextChangeOptions)
- TextDocumentBase.InsertText(ITextChangeType, Int32, String)
- TextDocumentBase.InsertText(ITextChangeType, Int32, String, ITextChangeOptions)
- TextDocumentBase.OnTextChanging(TextSnapshotChangingEventArgs)
- TextDocumentBase.RemoveTextChangedEventHandler(EventHandler<TextSnapshotChangedEventArgs>, EventHandlerPriority)
- TextDocumentBase.RemoveTextChangingEventHandler(EventHandler<TextSnapshotChangingEventArgs>, EventHandlerPriority)
- TextDocumentBase.ReplaceText(ITextChangeType, TextRange, String)
- TextDocumentBase.ReplaceText(ITextChangeType, TextRange, String, ITextChangeOptions)
- TextDocumentBase.ReplaceText(ITextChangeType, Int32, Int32, String)
- TextDocumentBase.ReplaceText(ITextChangeType, Int32, Int32, String, ITextChangeOptions)
- TextDocumentBase.SetHeaderAndFooterText(String, String)
- TextDocumentBase.SetText(String)
- TextDocumentBase.SetText(ITextChangeType, String)
- TextDocumentBase.SetText(ITextChangeType, String, ITextChangeOptions)
- TextDocumentBase.IsTextRangeReadOnly(TextRange)
- TextDocumentBase.NotifyPropertyChanged(String)
- TextDocumentBase.OnIsModifiedChanged(EventArgs)
- TextDocumentBase.OnIsReadOnlyChanged(EventArgs)
- TextDocumentBase.OnTabSizeChanged(EventArgs)
- TextDocumentBase.ReplaceAll(ISearchOptions)
- TextDocumentBase.ReplaceAll(ISearchOptions, TextRange[])
- TextDocumentBase.ReplaceNext(ISearchOptions, Int32, Boolean)
- TextDocumentBase.ReplaceNext(ISearchOptions, Int32, Boolean, TextRange)
- TextDocumentBase.LoadFile(String)
- TextDocumentBase.LoadFile(String, Encoding)
- TextDocumentBase.LoadFile(Stream, Encoding)
- TextDocumentBase.SaveFile(String, LineTerminator)
- TextDocumentBase.SaveFile(String, Encoding, LineTerminator)
- TextDocumentBase.SaveFile(Stream, Encoding, LineTerminator)
- TextDocumentBase.CurrentSnapshot
- TextDocumentBase.AutoCharacterCasing
- TextDocumentBase.AutoConvertTabsToSpaces
- TextDocumentBase.IsModified
- TextDocumentBase.IsReadOnly
- TextDocumentBase.TabSize
- TextDocumentBase.UndoHistory
- TextDocumentBase.FileName
- TextDocumentBase.TextChanged
- TextDocumentBase.TextChanging
- TextDocumentBase.IsModifiedChanged
- TextDocumentBase.IsReadOnlyChanged
- TextDocumentBase.PropertyChanged
- TextDocumentBase.TabSizeChanged
- TextDocumentBase.FileNameChanged
- System.Object.ToString()
- System.Object.Equals(System.Object)
- System.Object.Equals(System.Object, System.Object)
- System.Object.ReferenceEquals(System.Object, System.Object)
- System.Object.GetHashCode()
- System.Object.GetType()
- System.Object.MemberwiseClone()