src\Framework\System\Windows\Annotations\AnnotationHelper.cs (5)
696ITextRange textRange = new TextRange(start, end);
901private static Annotation CreateAnnotationForSelection(AnnotationService service, ITextRange textSelection, XmlQualifiedName annotationType, string author)
966ITextRange anchor = new TextRange(selection.Start, selection.End);
985private static Annotation ProcessHighlights(AnnotationService service, ITextRange textRange, string author, Nullable<Color> color, bool create)
1037private static Annotation CreateHighlight(AnnotationService service, ITextRange textRange, string author, Nullable<Color> color)
src\Framework\System\Windows\Documents\TextRange.cs (84)
123bool ITextRange.Contains(ITextPointer position)
133void ITextRange.Select(ITextPointer position1, ITextPointer position2)
143void ITextRange.SelectWord(ITextPointer position)
153void ITextRange.SelectParagraph(ITextPointer position)
161/// <see cref="System.Windows.Documents.ITextRange.ApplyTypingHeuristics"/>
163void ITextRange.ApplyTypingHeuristics(bool overType)
170object ITextRange.GetPropertyValue(DependencyProperty formattingProperty)
177UIElement ITextRange.GetUIElementSelected()
190bool ITextRange.CanSave(string dataFormat)
197void ITextRange.Save(Stream stream, string dataFormat)
204void ITextRange.Save(Stream stream, string dataFormat, bool preserveTextElements)
218/// <see cref="ITextRange.BeginChange"/>
220void ITextRange.BeginChange()
228/// <see cref="ITextRange.BeginChangeNoUndo"/>
230void ITextRange.BeginChangeNoUndo()
238/// <see cref="ITextRange.EndChange()"/>
240void ITextRange.EndChange()
248/// <see cref="ITextRange.EndChange(bool,bool)"/>
250void ITextRange.EndChange(bool disableScroll, bool skipEvents)
258/// <see cref="ITextRange.DeclareChangeBlock()"/>
260IDisposable ITextRange.DeclareChangeBlock()
266/// <see cref="ITextRange.DeclareChangeBlock(bool)"/>
268IDisposable ITextRange.DeclareChangeBlock(bool disableScroll)
274/// <see cref="ITextRange.NotifyChanged"/>
276void ITextRange.NotifyChanged(bool disableScroll, bool skipEvents)
293/// <see cref="ITextRange.Start"/>
295bool ITextRange.IgnoreTextUnitBoundaries
310/// <see cref="ITextRange.Start"/>
312ITextPointer ITextRange.Start
323/// <see cref="ITextRange.End"/>
325ITextPointer ITextRange.End
336/// <see cref="ITextRange.IsEmpty"/>
338bool ITextRange.IsEmpty
349/// <see cref="ITextRange.TextSegments"/>
351List<TextSegment> ITextRange.TextSegments
368/// <see cref="ITextRange.HasConcreteTextContainer"/>
370bool ITextRange.HasConcreteTextContainer
381/// <see cref="ITextRange.Text"/>
383string ITextRange.Text
401/// <see cref="ITextRange.Xml"/>
403string ITextRange.Xml
416/// <see cref="ITextRange.ChangeBlockLevel"/>
418int ITextRange.ChangeBlockLevel
435/// <see cref="ITextRange.IsTableCellRange"/>
437bool ITextRange.IsTableCellRange
454/// <see cref="ITextRange.Changed"/>
456event EventHandler ITextRange.Changed
470/// <see cref="ITextRange.FireChanged"/>
472void ITextRange.FireChanged()
488/// <see cref="ITextRange._IsTableCellRange"/>
490bool ITextRange._IsTableCellRange
504/// <see cref="ITextRange._TextSegments"/>
506List<TextSegment> ITextRange._TextSegments
520/// <see cref="ITextRange._ChangeBlockLevel"/>
522int ITextRange._ChangeBlockLevel
536/// <see cref="ITextRange._ChangeBlockUndoRecord"/>
538ChangeBlockUndoRecord ITextRange._ChangeBlockUndoRecord
553/// <see cref="ITextRange._IsChanged"/>
555bool ITextRange._IsChanged
570/// <see cref="ITextRange._ContentGeneration"/>
572uint ITextRange._ContentGeneration
644return ((ITextRange)this).Contains(textPointer);
675((ITextRange)this).Select(position1, position2);
690((ITextRange)this).SelectWord(textPointer);
701((ITextRange)this).SelectParagraph(position);
864return ((ITextRange)this).GetPropertyValue(formattingProperty);
877return ((ITextRange)this).GetUIElementSelected();
898return ((ITextRange)this).CanSave(dataFormat);
942((ITextRange)this).Save(stream, dataFormat);
976((ITextRange)this).Save(stream, dataFormat, preserveTextElements);
1266return (TextPointer)((ITextRange)this).Start;
1280return (TextPointer)((ITextRange)this).End;
1291return ((ITextRange)this).IsEmpty;
1305return ((ITextRange)this).HasConcreteTextContainer;
1345return ((ITextRange)this).Text;
1350((ITextRange)this).Text = value;
1361return ((ITextRange)this).Xml;
1397return ((ITextRange)this).IsTableCellRange;
1471((ITextRange)this).BeginChange();
1485((ITextRange)this).EndChange();
1523return ((ITextRange)this).DeclareChangeBlock();
1534return ((ITextRange)this).DeclareChangeBlock(disableScroll);
1848internal ChangeBlock(ITextRange range, bool disableScroll)
1861private readonly ITextRange _range;
src\Framework\System\Windows\Documents\TextRangeBase.cs (44)
63internal static bool Contains(ITextRange thisRange, ITextPointer textPointer)
121internal static void Select(ITextRange thisRange, ITextPointer position1, ITextPointer position2)
160internal static void Select(ITextRange thisRange, ITextPointer position1, ITextPointer position2, bool includeCellAtMovingPosition)
192internal static void SelectWord(ITextRange thisRange, ITextPointer position)
213internal static TextSegment GetAutoWord(ITextRange thisRange)
245internal static void SelectParagraph(ITextRange thisRange, ITextPointer position)
266internal static void ApplyInitialTypingHeuristics(ITextRange thisRange)
293internal static void ApplyFinalTypingHeuristics(ITextRange thisRange, bool overType)
325/// <see cref="System.Windows.Documents.ITextRange.ApplyTypingHeuristics"/>
327internal static void ApplyTypingHeuristics(ITextRange thisRange, bool overType)
387internal static object GetPropertyValue(ITextRange thisRange, DependencyProperty formattingProperty)
401private static object GetCharacterPropertyValue(ITextRange thisRange, DependencyProperty formattingProperty)
472private static object GetParagraphPropertyValue(ITextRange thisRange, DependencyProperty formattingProperty)
523internal static bool IsParagraphBoundaryCrossed(ITextRange thisRange)
554/// <see cref="ITextRange.BeginChange"/>
556internal static void BeginChange(ITextRange thisRange)
562/// <see cref="ITextRange.BeginChangeNoUndo"/>
564internal static void BeginChangeNoUndo(ITextRange thisRange)
570/// <see cref="ITextRange.EndChange()"/>
572internal static void EndChange(ITextRange thisRange)
578/// <see cref="ITextRange.EndChange(bool,bool)"/>
580internal static void EndChange(ITextRange thisRange, bool disableScroll, bool skipEvents)
645/// <see cref="ITextRange.NotifyChanged(bool,bool)"/>
647internal static void NotifyChanged(ITextRange thisRange, bool disableScroll)
1201internal static ITextPointer GetStart(ITextRange thisRange)
1209internal static ITextPointer GetEnd(ITextRange thisRange)
1217internal static bool GetIsEmpty(ITextRange thisRange)
1234internal static List<TextSegment> GetTextSegments(ITextRange thisRange)
1251internal static string GetText(ITextRange thisRange)
1295internal static void SetText(ITextRange thisRange, string textData)
1473internal static string GetXml(ITextRange thisRange)
1486internal static bool CanSave(ITextRange thisRange, string dataFormat)
1500internal static bool CanLoad(ITextRange thisRange, string dataFormat)
1514internal static void Save(ITextRange thisRange, Stream stream, string dataFormat, bool preserveTextElements)
1634internal static int GetChangeBlockLevel(ITextRange thisRange)
1645internal static UIElement GetUIElementSelected(ITextRange range)
1677internal static bool GetIsTableCellRange(ITextRange thisRange)
1696private static void BeginChangeWorker(ITextRange thisRange, string description)
1730private static void CreateNormalizedTextSegment(ITextRange thisRange, ITextPointer start, ITextPointer end)
1815private static bool IsAtNormalizedPosition(ITextRange thisRange, ITextPointer position, LogicalDirection direction)
1831private static ITextPointer GetNormalizedPosition(ITextRange thisRange, ITextPointer position, LogicalDirection direction)
1941private static void NormalizeRange(ITextRange thisRange)
2013private static void SelectPrivate(ITextRange thisRange, ITextPointer position1, ITextPointer position2, bool includeCellAtMovingPosition, bool markRangeChanged)
2111private static void MarkRangeChanged(ITextRange thisRange)
src\Framework\System\Windows\Documents\TextRangeSerialization.cs (11)
40internal static void WriteXaml(XmlWriter xmlWriter, ITextRange range, bool useFlowDocumentAsRoot, WpfPayload wpfPayload)
65internal static void WriteXaml(XmlWriter xmlWriter, ITextRange range, bool useFlowDocumentAsRoot, WpfPayload wpfPayload, bool preserveTextElements)
346private static void WriteXamlTableCellRange(XmlWriter xmlWriter, ITextRange range, XamlTypeMapper xamlTypeMapper, ref int elementLevel, WpfPayload wpfPayload, bool preserveTextElements)
374ITextRange textRange = new TextRange(textSegment.Start, textSegment.End);
427private static int WriteOpeningTags(ITextRange range, ITextPointer thisElement, ITextPointer scope, XmlWriter xmlWriter, XamlTypeMapper xamlTypeMapper, bool reduceElement, out bool ignoreWriteHyperlinkEnd, ref List<int> ignoreList, bool preserveTextElements)
547private static void WriteStartXamlElement(ITextRange range, ITextPointer textReader, XmlWriter xmlWriter, XamlTypeMapper xamlTypeMapper, bool reduceElement, bool preserveTextElements)
612private static void WriteTableColumnsInformation(ITextRange range, Table table, XmlWriter xmlWriter, XamlTypeMapper xamlTypeMapper)
657private static void WriteRootFlowDocument(ITextRange range, ITextPointer context, XmlWriter xmlWriter, XamlTypeMapper xamlTypeMapper, bool lastParagraphMustBeMerged, bool useFlowDocumentAsRoot)
1692private static ITextPointer FindSerializationCommonAncestor(ITextRange range)
1745private static bool IsAcceptableAncestor(ITextPointer commonAncestor, ITextRange range)
1941private static ITextPointer GetHyperlinkStart(ITextRange range)