176 references to Parent
PresentationFramework (176)
MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (2)
120list.Add(((TextPointer)start).Parent); 128DependencyObject node = current.Parent;
MS\Internal\PtsHost\ContainerParagraph.cs (1)
1047Invariant.Assert(Element == ((TextPointer)textPointer).Parent);
MS\Internal\PtsHost\Line.cs (1)
613element = position.Parent;
MS\Internal\PtsHost\ListParagraph.cs (1)
117if (Element == ((TextPointer)textPointer).Parent)
MS\Internal\Text\ComplexLine.cs (1)
302element = position.Parent as TextElement;
System\Windows\Controls\TextBlock.cs (3)
2830if (!(position is TextPointer) || ((TextPointer)position).Parent == null || ((TextPointer)position).Parent is TextBox) 2838Run implicitRun = Inline.CreateImplicitRun(((TextPointer)position).Parent);
System\Windows\Documents\ColumnResizeUndoUnit.cs (1)
47table = (Table) textPointerTable.Parent;
System\Windows\Documents\RangeContentEnumerator.cs (3)
131_currentCache = _navigator.Parent; 196_navigator.MoveToPosition(((TextElement)_navigator.Parent).ElementEnd); 324DependencyObject node = _start.Parent;
System\Windows\Documents\Span.cs (10)
113Invariant.Assert(start.Parent is Run); 115Invariant.Assert(end.Parent is Run); 133TextElement commonAncestor = TextElement.GetCommonAncestor((TextElement)start.Parent, (TextElement)end.Parent); 135while (start.Parent != commonAncestor) 139while (end.Parent != commonAncestor) 144if (start.Parent is Run) 148if (end.Parent is Run) 153Invariant.Assert(start.Parent == end.Parent);
System\Windows\Documents\TextContainer.cs (7)
225textElement = position.Parent as TextElement; 272textElement = position.Parent as TextElement; 922TextElement textElement = position.Parent as TextElement; 2398Invariant.Assert(startPosition.Parent == endPosition.Parent); 2399TextElement textElement = startPosition.Parent as TextElement; 3260element = position.Parent as TextElement;
System\windows\Documents\TextEditorContextMenu.cs (1)
84TextElement element = start.Parent as TextElement;
System\windows\Documents\TextEditorTyping.cs (8)
879(position1.Parent is BlockUIContainer || position2.Parent is BlockUIContainer) && 880position1.Parent != position2.Parent; 1416TableRow row = ((TextPointer)This.Selection.End).Parent as TableRow; 1444TextElement parent = ((TextPointer)This.Selection.Start).Parent as TextElement; 1891pointer.Parent is TextElement && 1892TextSchema.HasHyperlinkAncestor((TextElement)pointer.Parent))
System\Windows\Documents\TextEffectResolver.cs (1)
80effectStart.Parent,
System\Windows\Documents\TextElementEnumerator.cs (1)
145_current = (TextElementType)_navigator.Parent;
System\Windows\Documents\TextPointer.cs (16)
1679/// <para>The <see cref="TextPointer.Parent"/> property for this 1696/// <para>The <see cref="TextPointer.Parent"/> property for this 1722Inline ancestor = this.Parent as Inline; 1735TextElement ancestor = this.Parent as TextElement; 2146if (!((TextElement)this.Parent).IsEmpty) // the parent may be InlineUIContainer or BlockUIContainer 2530element = this.Parent as TextElement; 2547element = this.Parent as TextElement; 3546if (position.Parent == null) 3554Invariant.Assert(position.Parent is Run, "EnsureInsertionPosition() must return a position in text content"); 3555Run run = (Run)position.Parent; 3577TextElement element1 = position1.Parent as TextElement; 3578TextElement element2 = position2.Parent as TextElement; 3584commonAncestor = position1.Parent; 3588commonAncestor = position2.Parent; 3617DependencyObject element = this.Parent; 3866DependencyObject parentBlock = this.Parent;
System\Windows\Documents\TextPointerBase.cs (5)
754if (pointer.Parent is ListItem) 756return (ListItem)pointer.Parent; 770if (position.Parent is ListItem) 772return (ListItem)position.Parent; 789ListItem listItem = position.Parent as ListItem;
System\Windows\Documents\TextRangeBase.cs (9)
443DependencyObject element = ((TextPointer)pointer).Parent as TextElement; 826List list = (List)((TextPointer)navigator).Parent; 1296((TextPointer)thisRange.Start).Parent == ((TextPointer)thisRange.End).Parent && 1297((TextPointer)thisRange.Start).Parent is Run && 1824TextElement outerAnchoredBlock = start.Parent as TextElement; 1837TextElement innerElement = end.Parent as TextElement; 1866outerAnchoredBlock = end.Parent as TextElement; 1879TextElement innerElement = start.Parent as TextElement;
System\Windows\Documents\TextRangeEdit.cs (62)
56Invariant.Assert(splitPosition.Parent != null && TextSchema.IsMergeableInline(splitPosition.Parent.GetType())); 58Inline inline = (Inline)splitPosition.Parent; 166Inline inline = position.Parent as Inline; 176inline = position.Parent as Inline; 190inline = position.Parent as Inline; 201inline = position.Parent as Inline; 232start.Parent is Run && 233start.Parent == end.Parent && TextSchema.ValuesAreEqual(start.Parent.GetValue(formattingProperty), value)) 264TextSchema.IsMergeableInline(position.Parent.GetType())) 266position = ((Inline)position.Parent).ElementStart; 269TextSchema.IsMergeableInline(position.Parent.GetType())) 271position = ((Inline)position.Parent).ElementEnd; 323Inline inline = position.Parent as Inline; 420TextElement parent = (TextElement)start.Parent; 524TextElement element = (TextElement)position.Parent; 637Invariant.Assert(breakPosition.Parent == paragraph, "breakPosition must be in paragraph scope after splitting formatting elements"); 649Invariant.Assert(breakPosition.Parent is ListItem, "breakPosition must be in ListItem scope"); 656while (!(breakPosition.Parent is Paragraph) && breakPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 1033block = pointer.Parent as Block; 1279TextSchema.IsMergeableInline(position.Parent.GetType())) 1281position = ((Inline)position.Parent).ElementStart; 1284TextSchema.IsMergeableInline(position.Parent.GetType())) 1286position = ((Inline)position.Parent).ElementEnd; 1288TextElement commonAncestor = position.Parent as TextElement; 1303Run previousRun = previousPosition.Parent as Run; 1312Run nextRun = nextPosition.Parent as Run; 1443TextElement parent = (TextElement)startPosition.Parent; 1493if (startPosition.Parent is BlockUIContainer && ((BlockUIContainer)startPosition.Parent).IsEmpty) 1495((BlockUIContainer)startPosition.Parent).Reposition(null, null); 1497else if (startPosition.Parent is Hyperlink && ((Hyperlink)startPosition.Parent).IsEmpty) 1499((Hyperlink)startPosition.Parent).Reposition(null, null); 1571if (start.Parent == end.Parent) 1615Invariant.Assert(previousPosition.Parent == nextPosition.Parent, "inconsistent position Parents: previous and next"); 1627Invariant.Assert(nextPosition.Parent == end.Parent, "inconsistent poaition Parents: next and end"); 1666Invariant.Assert(previousPosition.Parent == nextPosition.Parent, "inconsistent Parents: previousPosition, nextPosition"); 1689Invariant.Assert(one.Parent == two.Parent, "inconsistent Parents: one and two"); 1750Run run = splitPosition.Parent as Run; 1766while (splitPosition.Parent != null && TextSchema.IsMergeableInline(splitPosition.Parent.GetType()) && splitPosition.Parent != limitingAncestor && 1768((((Inline)splitPosition.Parent).Parent != null && !HasLocalInheritableStructuralPropertyValue((Inline)splitPosition.Parent)) || 1769(((Inline)splitPosition.Parent).Parent == null && !HasLocalStructuralPropertyValue((Inline)splitPosition.Parent))))) 2092Invariant.Assert(pointer.Parent is Run); 2093run = pointer.Parent as Run; 2119TextSchema.IsFormattingType(start.Parent.GetType())) // look for Run/Span elements 2121start.Parent.ClearValue(formattingProperty); 2235start.Parent is Paragraph) 2237Paragraph paragraph = (Paragraph)start.Parent; 2265for (parent = (Inline)start.Parent; parent != commonAncestor; parent = (Inline)parent.Parent) 2276for (parent = (Inline)end.Parent; parent != commonAncestor; parent = (Inline)parent.Parent)
System\Windows\Documents\TextRangeEditLists.cs (3)
607if (end.Parent == startListItem.Parent) 636if (!TextSchema.AllowsParagraphMerging(position.Parent.GetType())) 656if (!TextSchema.AllowsParagraphMerging(position.Parent.GetType()))
System\Windows\Documents\TextRangeEditTables.cs (18)
110TextElement element = position.Parent as TextElement; 122TextElement element = position.Parent as TextElement; 134TextElement element = position.Parent as TextElement; 565TableRow row = (TableRow)selection.MovingPosition.Parent; 631TextElement ancestor = insertionPosition.Parent as TextElement; 745BlockUIContainer blockUIContainer = (BlockUIContainer)position.Parent; 818DependencyObject parent = position.Parent; 827parent = position.Parent; 836parent = position.Parent; 845parent = position.Parent; 854parent = position.Parent; 860parent = position.Parent; 904Run implicitRun = Run.CreateImplicitRun(position.Parent); 2102TableRow movingCellRow = movingPosition.Parent as TableRow; 2134if (anchorPosition.Parent == movingPosition.Parent) 2148TextElement commonAncestor = anchorPosition.Parent as TextElement; 2177TextElement element = position.Parent as TextElement;
System\Windows\Documents\TextRangeSerialization.cs (14)
595WriteTableColumnsInformation(range, (Table)((TextPointer)textReader).Parent, xmlWriter, xamlTypeMapper); 697WriteInheritablePropertiesForFlowDocument((DependencyObject)((TextPointer)context).Parent, xmlWriter, complexProperties); 1303Invariant.Assert(insertionPosition.Parent is Paragraph, "insertionPosition must be in a scope of a Paragraph after splitting formatting elements"); 1415TextSchema.IsFormattingType(positionBeforeParagraph.Parent.GetType())) 1420TextSchema.AllowsParagraphMerging(positionBeforeParagraph.Parent.GetType())) 1443if (insertionPosition.Parent is List) 1455while (navigator != null && !(navigator.Parent is Paragraph)) 1469Invariant.Assert(navigator.Parent is Paragraph, "We suppose have a first paragraph found"); 1470Paragraph firstParagraph = (Paragraph)navigator.Parent; 1473while (navigator != null && !(navigator.Parent is Paragraph)) 1487Invariant.Assert(navigator.Parent is Paragraph, "We suppose a second paragraph found"); 1488Paragraph secondParagraph = (Paragraph)navigator.Parent; 1600if (TextSchema.ValuesAreEqual(start.Parent.GetValue(property), value)) 1613TextElement element = (TextElement)start.Parent;
System\Windows\Documents\TextSchema.cs (1)
158DependencyObject parent = position.Parent;
System\windows\Documents\TextSelection.cs (2)
1424propertyValue = this.Start.Parent.GetValue(formattingProperty); 1461SpringloadCurrentFormatting(start.Parent);
System\Windows\Documents\TextStore.cs (2)
1255TextElement startElement = (TextElement)((TextPointer)start).Parent; 1256TextElement endElement = (TextElement)((TextPointer)end).Parent;
System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (1)
475Table table = (Table) textPointerTable.Parent;
System\Windows\Documents\TextTreePropertyUndoUnit.cs (1)
60position.Parent.ClearValue(_propertyRecord.Property);
System\Windows\Documents\ValidationHelper.cs (1)
108throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, position.Parent.GetType().Name, child.GetType().Name));