176 references to Parent
PresentationFramework (176)
MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (2)
119list.Add(((TextPointer)start).Parent); 127DependencyObject node = current.Parent;
MS\Internal\PtsHost\ContainerParagraph.cs (1)
1028Invariant.Assert(Element == ((TextPointer)textPointer).Parent);
MS\Internal\PtsHost\Line.cs (1)
600element = position.Parent;
MS\Internal\PtsHost\ListParagraph.cs (1)
107if (Element == ((TextPointer)textPointer).Parent)
MS\Internal\Text\ComplexLine.cs (1)
301element = position.Parent as TextElement;
System\Windows\Controls\TextBlock.cs (3)
2818if (!(position is TextPointer) || ((TextPointer)position).Parent == null || ((TextPointer)position).Parent is TextBox) 2826Run implicitRun = Inline.CreateImplicitRun(((TextPointer)position).Parent);
System\Windows\Documents\ColumnResizeUndoUnit.cs (1)
46table = (Table) textPointerTable.Parent;
System\Windows\Documents\RangeContentEnumerator.cs (3)
124_currentCache = _navigator.Parent; 189_navigator.MoveToPosition(((TextElement)_navigator.Parent).ElementEnd); 317DependencyObject node = _start.Parent;
System\Windows\Documents\Span.cs (10)
103Invariant.Assert(start.Parent is Run); 105Invariant.Assert(end.Parent is Run); 123TextElement commonAncestor = TextElement.GetCommonAncestor((TextElement)start.Parent, (TextElement)end.Parent); 125while (start.Parent != commonAncestor) 129while (end.Parent != commonAncestor) 134if (start.Parent is Run) 138if (end.Parent is Run) 143Invariant.Assert(start.Parent == end.Parent);
System\Windows\Documents\TextContainer.cs (7)
224textElement = position.Parent as TextElement; 271textElement = position.Parent as TextElement; 921TextElement textElement = position.Parent as TextElement; 2379Invariant.Assert(startPosition.Parent == endPosition.Parent); 2380TextElement textElement = startPosition.Parent as TextElement; 3232element = position.Parent as TextElement;
System\windows\Documents\TextEditorContextMenu.cs (1)
83TextElement element = start.Parent as TextElement;
System\windows\Documents\TextEditorTyping.cs (8)
869(position1.Parent is BlockUIContainer || position2.Parent is BlockUIContainer) && 870position1.Parent != position2.Parent; 1403TableRow row = ((TextPointer)This.Selection.End).Parent as TableRow; 1431TextElement parent = ((TextPointer)This.Selection.Start).Parent as TextElement; 1878pointer.Parent is TextElement && 1879TextSchema.HasHyperlinkAncestor((TextElement)pointer.Parent))
System\Windows\Documents\TextEffectResolver.cs (1)
79effectStart.Parent,
System\Windows\Documents\TextElementEnumerator.cs (1)
140_current = (TextElementType)_navigator.Parent;
System\Windows\Documents\TextPointer.cs (16)
1678/// <para>The <see cref="TextPointer.Parent"/> property for this 1695/// <para>The <see cref="TextPointer.Parent"/> property for this 1721Inline ancestor = this.Parent as Inline; 1734TextElement ancestor = this.Parent as TextElement; 2145if (!((TextElement)this.Parent).IsEmpty) // the parent may be InlineUIContainer or BlockUIContainer 2529element = this.Parent as TextElement; 2546element = this.Parent as TextElement; 3545if (position.Parent == null) 3553Invariant.Assert(position.Parent is Run, "EnsureInsertionPosition() must return a position in text content"); 3554Run run = (Run)position.Parent; 3576TextElement element1 = position1.Parent as TextElement; 3577TextElement element2 = position2.Parent as TextElement; 3583commonAncestor = position1.Parent; 3587commonAncestor = position2.Parent; 3616DependencyObject element = this.Parent; 3865DependencyObject parentBlock = this.Parent;
System\Windows\Documents\TextPointerBase.cs (5)
753if (pointer.Parent is ListItem) 755return (ListItem)pointer.Parent; 769if (position.Parent is ListItem) 771return (ListItem)position.Parent; 788ListItem listItem = position.Parent as ListItem;
System\Windows\Documents\TextRangeBase.cs (9)
442DependencyObject element = ((TextPointer)pointer).Parent as TextElement; 825List list = (List)((TextPointer)navigator).Parent; 1295((TextPointer)thisRange.Start).Parent == ((TextPointer)thisRange.End).Parent && 1296((TextPointer)thisRange.Start).Parent is Run && 1822TextElement outerAnchoredBlock = start.Parent as TextElement; 1835TextElement innerElement = end.Parent as TextElement; 1864outerAnchoredBlock = end.Parent as TextElement; 1877TextElement innerElement = start.Parent as TextElement;
System\Windows\Documents\TextRangeEdit.cs (62)
55Invariant.Assert(splitPosition.Parent != null && TextSchema.IsMergeableInline(splitPosition.Parent.GetType())); 57Inline inline = (Inline)splitPosition.Parent; 165Inline inline = position.Parent as Inline; 175inline = position.Parent as Inline; 189inline = position.Parent as Inline; 200inline = position.Parent as Inline; 231start.Parent is Run && 232start.Parent == end.Parent && TextSchema.ValuesAreEqual(start.Parent.GetValue(formattingProperty), value)) 263TextSchema.IsMergeableInline(position.Parent.GetType())) 265position = ((Inline)position.Parent).ElementStart; 268TextSchema.IsMergeableInline(position.Parent.GetType())) 270position = ((Inline)position.Parent).ElementEnd; 322Inline inline = position.Parent as Inline; 419TextElement parent = (TextElement)start.Parent; 523TextElement element = (TextElement)position.Parent; 636Invariant.Assert(breakPosition.Parent == paragraph, "breakPosition must be in paragraph scope after splitting formatting elements"); 648Invariant.Assert(breakPosition.Parent is ListItem, "breakPosition must be in ListItem scope"); 655while (!(breakPosition.Parent is Paragraph) && breakPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 1032block = pointer.Parent as Block; 1278TextSchema.IsMergeableInline(position.Parent.GetType())) 1280position = ((Inline)position.Parent).ElementStart; 1283TextSchema.IsMergeableInline(position.Parent.GetType())) 1285position = ((Inline)position.Parent).ElementEnd; 1287TextElement commonAncestor = position.Parent as TextElement; 1302Run previousRun = previousPosition.Parent as Run; 1311Run nextRun = nextPosition.Parent as Run; 1442TextElement parent = (TextElement)startPosition.Parent; 1492if (startPosition.Parent is BlockUIContainer && ((BlockUIContainer)startPosition.Parent).IsEmpty) 1494((BlockUIContainer)startPosition.Parent).Reposition(null, null); 1496else if (startPosition.Parent is Hyperlink && ((Hyperlink)startPosition.Parent).IsEmpty) 1498((Hyperlink)startPosition.Parent).Reposition(null, null); 1570if (start.Parent == end.Parent) 1614Invariant.Assert(previousPosition.Parent == nextPosition.Parent, "inconsistent position Parents: previous and next"); 1626Invariant.Assert(nextPosition.Parent == end.Parent, "inconsistent poaition Parents: next and end"); 1665Invariant.Assert(previousPosition.Parent == nextPosition.Parent, "inconsistent Parents: previousPosition, nextPosition"); 1688Invariant.Assert(one.Parent == two.Parent, "inconsistent Parents: one and two"); 1749Run run = splitPosition.Parent as Run; 1765while (splitPosition.Parent != null && TextSchema.IsMergeableInline(splitPosition.Parent.GetType()) && splitPosition.Parent != limitingAncestor && 1767((((Inline)splitPosition.Parent).Parent != null && !HasLocalInheritableStructuralPropertyValue((Inline)splitPosition.Parent)) || 1768(((Inline)splitPosition.Parent).Parent == null && !HasLocalStructuralPropertyValue((Inline)splitPosition.Parent))))) 2091Invariant.Assert(pointer.Parent is Run); 2092run = pointer.Parent as Run; 2118TextSchema.IsFormattingType(start.Parent.GetType())) // look for Run/Span elements 2120start.Parent.ClearValue(formattingProperty); 2234start.Parent is Paragraph) 2236Paragraph paragraph = (Paragraph)start.Parent; 2264for (parent = (Inline)start.Parent; parent != commonAncestor; parent = (Inline)parent.Parent) 2275for (parent = (Inline)end.Parent; parent != commonAncestor; parent = (Inline)parent.Parent)
System\Windows\Documents\TextRangeEditLists.cs (3)
608if (end.Parent == startListItem.Parent) 637if (!TextSchema.AllowsParagraphMerging(position.Parent.GetType())) 657if (!TextSchema.AllowsParagraphMerging(position.Parent.GetType()))
System\Windows\Documents\TextRangeEditTables.cs (18)
109TextElement element = position.Parent as TextElement; 121TextElement element = position.Parent as TextElement; 133TextElement element = position.Parent as TextElement; 564TableRow row = (TableRow)selection.MovingPosition.Parent; 630TextElement ancestor = insertionPosition.Parent as TextElement; 748BlockUIContainer blockUIContainer = (BlockUIContainer)position.Parent; 821DependencyObject parent = position.Parent; 830parent = position.Parent; 839parent = position.Parent; 848parent = position.Parent; 857parent = position.Parent; 863parent = position.Parent; 907Run implicitRun = Run.CreateImplicitRun(position.Parent); 2105TableRow movingCellRow = movingPosition.Parent as TableRow; 2137if (anchorPosition.Parent == movingPosition.Parent) 2151TextElement commonAncestor = anchorPosition.Parent as TextElement; 2180TextElement element = position.Parent as TextElement;
System\Windows\Documents\TextRangeSerialization.cs (14)
594WriteTableColumnsInformation(range, (Table)((TextPointer)textReader).Parent, xmlWriter, xamlTypeMapper); 696WriteInheritablePropertiesForFlowDocument((DependencyObject)((TextPointer)context).Parent, xmlWriter, complexProperties); 1302Invariant.Assert(insertionPosition.Parent is Paragraph, "insertionPosition must be in a scope of a Paragraph after splitting formatting elements"); 1414TextSchema.IsFormattingType(positionBeforeParagraph.Parent.GetType())) 1419TextSchema.AllowsParagraphMerging(positionBeforeParagraph.Parent.GetType())) 1442if (insertionPosition.Parent is List) 1454while (navigator != null && !(navigator.Parent is Paragraph)) 1468Invariant.Assert(navigator.Parent is Paragraph, "We suppose have a first paragraph found"); 1469Paragraph firstParagraph = (Paragraph)navigator.Parent; 1472while (navigator != null && !(navigator.Parent is Paragraph)) 1486Invariant.Assert(navigator.Parent is Paragraph, "We suppose a second paragraph found"); 1487Paragraph secondParagraph = (Paragraph)navigator.Parent; 1599if (TextSchema.ValuesAreEqual(start.Parent.GetValue(property), value)) 1612TextElement element = (TextElement)start.Parent;
System\Windows\Documents\TextSchema.cs (1)
157DependencyObject parent = position.Parent;
System\windows\Documents\TextSelection.cs (2)
1408propertyValue = this.Start.Parent.GetValue(formattingProperty); 1445SpringloadCurrentFormatting(start.Parent);
System\Windows\Documents\TextStore.cs (2)
1251TextElement startElement = (TextElement)((TextPointer)start).Parent; 1252TextElement endElement = (TextElement)((TextPointer)end).Parent;
System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (1)
474Table table = (Table) textPointerTable.Parent;
System\Windows\Documents\TextTreePropertyUndoUnit.cs (1)
59position.Parent.ClearValue(_propertyRecord.Property);
System\Windows\Documents\ValidationHelper.cs (1)
107throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, position.Parent.GetType().Name, child.GetType().Name));