src\Framework\System\Windows\Documents\TextRangeEdit.cs (62)
60Invariant.Assert(splitPosition.Parent != null && TextSchema.IsMergeableInline(splitPosition.Parent.GetType()));
62Inline inline = (Inline)splitPosition.Parent;
170Inline inline = position.Parent as Inline;
180inline = position.Parent as Inline;
194inline = position.Parent as Inline;
205inline = position.Parent as Inline;
236start.Parent is Run &&
237start.Parent == end.Parent && TextSchema.ValuesAreEqual(start.Parent.GetValue(formattingProperty), value))
268TextSchema.IsMergeableInline(position.Parent.GetType()))
270position = ((Inline)position.Parent).ElementStart;
273TextSchema.IsMergeableInline(position.Parent.GetType()))
275position = ((Inline)position.Parent).ElementEnd;
327Inline inline = position.Parent as Inline;
424TextElement parent = (TextElement)start.Parent;
528TextElement element = (TextElement)position.Parent;
641Invariant.Assert(breakPosition.Parent == paragraph, "breakPosition must be in paragraph scope after splitting formatting elements");
653Invariant.Assert(breakPosition.Parent is ListItem, "breakPosition must be in ListItem scope");
660while (!(breakPosition.Parent is Paragraph) && breakPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart)
1037block = pointer.Parent as Block;
1283TextSchema.IsMergeableInline(position.Parent.GetType()))
1285position = ((Inline)position.Parent).ElementStart;
1288TextSchema.IsMergeableInline(position.Parent.GetType()))
1290position = ((Inline)position.Parent).ElementEnd;
1292TextElement commonAncestor = position.Parent as TextElement;
1307Run previousRun = previousPosition.Parent as Run;
1316Run nextRun = nextPosition.Parent as Run;
1447TextElement parent = (TextElement)startPosition.Parent;
1497if (startPosition.Parent is BlockUIContainer && ((BlockUIContainer)startPosition.Parent).IsEmpty)
1499((BlockUIContainer)startPosition.Parent).Reposition(null, null);
1501else if (startPosition.Parent is Hyperlink && ((Hyperlink)startPosition.Parent).IsEmpty)
1503((Hyperlink)startPosition.Parent).Reposition(null, null);
1575if (start.Parent == end.Parent)
1619Invariant.Assert(previousPosition.Parent == nextPosition.Parent, "inconsistent position Parents: previous and next");
1631Invariant.Assert(nextPosition.Parent == end.Parent, "inconsistent poaition Parents: next and end");
1670Invariant.Assert(previousPosition.Parent == nextPosition.Parent, "inconsistent Parents: previousPosition, nextPosition");
1693Invariant.Assert(one.Parent == two.Parent, "inconsistent Parents: one and two");
1754Run run = splitPosition.Parent as Run;
1770while (splitPosition.Parent != null && TextSchema.IsMergeableInline(splitPosition.Parent.GetType()) && splitPosition.Parent != limitingAncestor &&
1772((((Inline)splitPosition.Parent).Parent != null && !HasLocalInheritableStructuralPropertyValue((Inline)splitPosition.Parent)) ||
1773(((Inline)splitPosition.Parent).Parent == null && !HasLocalStructuralPropertyValue((Inline)splitPosition.Parent)))))
2096Invariant.Assert(pointer.Parent is Run);
2097run = pointer.Parent as Run;
2123TextSchema.IsFormattingType(start.Parent.GetType())) // look for Run/Span elements
2125start.Parent.ClearValue(formattingProperty);
2239start.Parent is Paragraph)
2241Paragraph paragraph = (Paragraph)start.Parent;
2269for (parent = (Inline)start.Parent; parent != commonAncestor; parent = (Inline)parent.Parent)
2280for (parent = (Inline)end.Parent; parent != commonAncestor; parent = (Inline)parent.Parent)