176 references to Parent
PresentationFramework (176)
MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (2)
129list.Add(((TextPointer)start).Parent); 137DependencyObject node = current.Parent;
MS\Internal\PtsHost\ContainerParagraph.cs (1)
1052Invariant.Assert(Element == ((TextPointer)textPointer).Parent);
MS\Internal\PtsHost\Line.cs (1)
619element = position.Parent;
MS\Internal\PtsHost\ListParagraph.cs (1)
120if (Element == ((TextPointer)textPointer).Parent)
MS\Internal\Text\ComplexLine.cs (1)
307element = position.Parent as TextElement;
System\Windows\Controls\TextBlock.cs (3)
2840if (!(position is TextPointer) || ((TextPointer)position).Parent == null || ((TextPointer)position).Parent is TextBox) 2848Run implicitRun = Inline.CreateImplicitRun(((TextPointer)position).Parent);
System\Windows\Documents\ColumnResizeUndoUnit.cs (1)
47table = (Table) textPointerTable.Parent;
System\Windows\Documents\RangeContentEnumerator.cs (3)
135_currentCache = _navigator.Parent; 200_navigator.MoveToPosition(((TextElement)_navigator.Parent).ElementEnd); 328DependencyObject node = _start.Parent;
System\Windows\Documents\Span.cs (10)
114Invariant.Assert(start.Parent is Run); 116Invariant.Assert(end.Parent is Run); 134TextElement commonAncestor = TextElement.GetCommonAncestor((TextElement)start.Parent, (TextElement)end.Parent); 136while (start.Parent != commonAncestor) 140while (end.Parent != commonAncestor) 145if (start.Parent is Run) 149if (end.Parent is Run) 154Invariant.Assert(start.Parent == end.Parent);
System\Windows\Documents\TextContainer.cs (7)
230textElement = position.Parent as TextElement; 277textElement = position.Parent as TextElement; 927TextElement textElement = position.Parent as TextElement; 2403Invariant.Assert(startPosition.Parent == endPosition.Parent); 2404TextElement textElement = startPosition.Parent as TextElement; 3265element = position.Parent as TextElement;
System\windows\Documents\TextEditorContextMenu.cs (1)
86TextElement element = start.Parent as TextElement;
System\windows\Documents\TextEditorTyping.cs (8)
888(position1.Parent is BlockUIContainer || position2.Parent is BlockUIContainer) && 889position1.Parent != position2.Parent; 1425TableRow row = ((TextPointer)This.Selection.End).Parent as TableRow; 1453TextElement parent = ((TextPointer)This.Selection.Start).Parent as TextElement; 1900pointer.Parent is TextElement && 1901TextSchema.HasHyperlinkAncestor((TextElement)pointer.Parent))
System\Windows\Documents\TextEffectResolver.cs (1)
84effectStart.Parent,
System\Windows\Documents\TextElementEnumerator.cs (1)
151_current = (TextElementType)_navigator.Parent;
System\Windows\Documents\TextPointer.cs (16)
1684/// <para>The <see cref="TextPointer.Parent"/> property for this 1701/// <para>The <see cref="TextPointer.Parent"/> property for this 1727Inline ancestor = this.Parent as Inline; 1740TextElement ancestor = this.Parent as TextElement; 2151if (!((TextElement)this.Parent).IsEmpty) // the parent may be InlineUIContainer or BlockUIContainer 2535element = this.Parent as TextElement; 2552element = this.Parent as TextElement; 3551if (position.Parent == null) 3559Invariant.Assert(position.Parent is Run, "EnsureInsertionPosition() must return a position in text content"); 3560Run run = (Run)position.Parent; 3582TextElement element1 = position1.Parent as TextElement; 3583TextElement element2 = position2.Parent as TextElement; 3589commonAncestor = position1.Parent; 3593commonAncestor = position2.Parent; 3622DependencyObject element = this.Parent; 3871DependencyObject parentBlock = this.Parent;
System\Windows\Documents\TextPointerBase.cs (5)
756if (pointer.Parent is ListItem) 758return (ListItem)pointer.Parent; 772if (position.Parent is ListItem) 774return (ListItem)position.Parent; 791ListItem listItem = position.Parent as ListItem;
System\Windows\Documents\TextRangeBase.cs (9)
446DependencyObject element = ((TextPointer)pointer).Parent as TextElement; 829List list = (List)((TextPointer)navigator).Parent; 1299((TextPointer)thisRange.Start).Parent == ((TextPointer)thisRange.End).Parent && 1300((TextPointer)thisRange.Start).Parent is Run && 1827TextElement outerAnchoredBlock = start.Parent as TextElement; 1840TextElement innerElement = end.Parent as TextElement; 1869outerAnchoredBlock = end.Parent as TextElement; 1882TextElement innerElement = start.Parent as TextElement;
System\Windows\Documents\TextRangeEdit.cs (62)
58Invariant.Assert(splitPosition.Parent != null && TextSchema.IsMergeableInline(splitPosition.Parent.GetType())); 60Inline inline = (Inline)splitPosition.Parent; 168Inline inline = position.Parent as Inline; 178inline = position.Parent as Inline; 192inline = position.Parent as Inline; 203inline = position.Parent as Inline; 234start.Parent is Run && 235start.Parent == end.Parent && TextSchema.ValuesAreEqual(start.Parent.GetValue(formattingProperty), value)) 266TextSchema.IsMergeableInline(position.Parent.GetType())) 268position = ((Inline)position.Parent).ElementStart; 271TextSchema.IsMergeableInline(position.Parent.GetType())) 273position = ((Inline)position.Parent).ElementEnd; 325Inline inline = position.Parent as Inline; 422TextElement parent = (TextElement)start.Parent; 526TextElement element = (TextElement)position.Parent; 639Invariant.Assert(breakPosition.Parent == paragraph, "breakPosition must be in paragraph scope after splitting formatting elements"); 651Invariant.Assert(breakPosition.Parent is ListItem, "breakPosition must be in ListItem scope"); 658while (!(breakPosition.Parent is Paragraph) && breakPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 1035block = pointer.Parent as Block; 1281TextSchema.IsMergeableInline(position.Parent.GetType())) 1283position = ((Inline)position.Parent).ElementStart; 1286TextSchema.IsMergeableInline(position.Parent.GetType())) 1288position = ((Inline)position.Parent).ElementEnd; 1290TextElement commonAncestor = position.Parent as TextElement; 1305Run previousRun = previousPosition.Parent as Run; 1314Run nextRun = nextPosition.Parent as Run; 1445TextElement parent = (TextElement)startPosition.Parent; 1495if (startPosition.Parent is BlockUIContainer && ((BlockUIContainer)startPosition.Parent).IsEmpty) 1497((BlockUIContainer)startPosition.Parent).Reposition(null, null); 1499else if (startPosition.Parent is Hyperlink && ((Hyperlink)startPosition.Parent).IsEmpty) 1501((Hyperlink)startPosition.Parent).Reposition(null, null); 1573if (start.Parent == end.Parent) 1617Invariant.Assert(previousPosition.Parent == nextPosition.Parent, "inconsistent position Parents: previous and next"); 1629Invariant.Assert(nextPosition.Parent == end.Parent, "inconsistent poaition Parents: next and end"); 1668Invariant.Assert(previousPosition.Parent == nextPosition.Parent, "inconsistent Parents: previousPosition, nextPosition"); 1691Invariant.Assert(one.Parent == two.Parent, "inconsistent Parents: one and two"); 1752Run run = splitPosition.Parent as Run; 1768while (splitPosition.Parent != null && TextSchema.IsMergeableInline(splitPosition.Parent.GetType()) && splitPosition.Parent != limitingAncestor && 1770((((Inline)splitPosition.Parent).Parent != null && !HasLocalInheritableStructuralPropertyValue((Inline)splitPosition.Parent)) || 1771(((Inline)splitPosition.Parent).Parent == null && !HasLocalStructuralPropertyValue((Inline)splitPosition.Parent))))) 2094Invariant.Assert(pointer.Parent is Run); 2095run = pointer.Parent as Run; 2121TextSchema.IsFormattingType(start.Parent.GetType())) // look for Run/Span elements 2123start.Parent.ClearValue(formattingProperty); 2237start.Parent is Paragraph) 2239Paragraph paragraph = (Paragraph)start.Parent; 2267for (parent = (Inline)start.Parent; parent != commonAncestor; parent = (Inline)parent.Parent) 2278for (parent = (Inline)end.Parent; parent != commonAncestor; parent = (Inline)parent.Parent)
System\Windows\Documents\TextRangeEditLists.cs (3)
609if (end.Parent == startListItem.Parent) 638if (!TextSchema.AllowsParagraphMerging(position.Parent.GetType())) 658if (!TextSchema.AllowsParagraphMerging(position.Parent.GetType()))
System\Windows\Documents\TextRangeEditTables.cs (18)
112TextElement element = position.Parent as TextElement; 124TextElement element = position.Parent as TextElement; 136TextElement element = position.Parent as TextElement; 567TableRow row = (TableRow)selection.MovingPosition.Parent; 633TextElement ancestor = insertionPosition.Parent as TextElement; 747BlockUIContainer blockUIContainer = (BlockUIContainer)position.Parent; 820DependencyObject parent = position.Parent; 829parent = position.Parent; 838parent = position.Parent; 847parent = position.Parent; 856parent = position.Parent; 862parent = position.Parent; 906Run implicitRun = Run.CreateImplicitRun(position.Parent); 2104TableRow movingCellRow = movingPosition.Parent as TableRow; 2136if (anchorPosition.Parent == movingPosition.Parent) 2150TextElement commonAncestor = anchorPosition.Parent as TextElement; 2179TextElement element = position.Parent as TextElement;
System\Windows\Documents\TextRangeSerialization.cs (14)
601WriteTableColumnsInformation(range, (Table)((TextPointer)textReader).Parent, xmlWriter, xamlTypeMapper); 703WriteInheritablePropertiesForFlowDocument((DependencyObject)((TextPointer)context).Parent, xmlWriter, complexProperties); 1309Invariant.Assert(insertionPosition.Parent is Paragraph, "insertionPosition must be in a scope of a Paragraph after splitting formatting elements"); 1421TextSchema.IsFormattingType(positionBeforeParagraph.Parent.GetType())) 1426TextSchema.AllowsParagraphMerging(positionBeforeParagraph.Parent.GetType())) 1449if (insertionPosition.Parent is List) 1461while (navigator != null && !(navigator.Parent is Paragraph)) 1475Invariant.Assert(navigator.Parent is Paragraph, "We suppose have a first paragraph found"); 1476Paragraph firstParagraph = (Paragraph)navigator.Parent; 1479while (navigator != null && !(navigator.Parent is Paragraph)) 1493Invariant.Assert(navigator.Parent is Paragraph, "We suppose a second paragraph found"); 1494Paragraph secondParagraph = (Paragraph)navigator.Parent; 1606if (TextSchema.ValuesAreEqual(start.Parent.GetValue(property), value)) 1619TextElement element = (TextElement)start.Parent;
System\Windows\Documents\TextSchema.cs (1)
159DependencyObject parent = position.Parent;
System\windows\Documents\TextSelection.cs (2)
1427propertyValue = this.Start.Parent.GetValue(formattingProperty); 1464SpringloadCurrentFormatting(start.Parent);
System\Windows\Documents\TextStore.cs (2)
1266TextElement startElement = (TextElement)((TextPointer)start).Parent; 1267TextElement endElement = (TextElement)((TextPointer)end).Parent;
System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (1)
477Table table = (Table) textPointerTable.Parent;
System\Windows\Documents\TextTreePropertyUndoUnit.cs (1)
61position.Parent.ClearValue(_propertyRecord.Property);
System\Windows\Documents\ValidationHelper.cs (1)
110throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, position.Parent.GetType().Name, child.GetType().Name));