176 references to Parent
PresentationFramework (176)
src\Framework\MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (2)
133list.Add(((TextPointer)start).Parent); 141DependencyObject node = current.Parent;
src\Framework\MS\Internal\PtsHost\ContainerParagraph.cs (1)
1078Invariant.Assert(Element == ((TextPointer)textPointer).Parent);
src\Framework\MS\Internal\PtsHost\Line.cs (1)
622element = position.Parent;
src\Framework\MS\Internal\PtsHost\ListParagraph.cs (1)
126if (Element == ((TextPointer)textPointer).Parent)
src\Framework\MS\Internal\Text\ComplexLine.cs (1)
311element = position.Parent as TextElement;
src\Framework\System\Windows\Controls\TextBlock.cs (3)
2929if (!(position is TextPointer) || ((TextPointer)position).Parent == null || ((TextPointer)position).Parent is TextBox) 2937Run implicitRun = Inline.CreateImplicitRun(((TextPointer)position).Parent);
src\Framework\System\Windows\Documents\ColumnResizeUndoUnit.cs (1)
53table = (Table) textPointerTable.Parent;
src\Framework\System\Windows\Documents\RangeContentEnumerator.cs (3)
143_currentCache = _navigator.Parent; 208_navigator.MoveToPosition(((TextElement)_navigator.Parent).ElementEnd); 336DependencyObject node = _start.Parent;
src\Framework\System\Windows\Documents\Span.cs (10)
120Invariant.Assert(start.Parent is Run); 122Invariant.Assert(end.Parent is Run); 140TextElement commonAncestor = TextElement.GetCommonAncestor((TextElement)start.Parent, (TextElement)end.Parent); 142while (start.Parent != commonAncestor) 146while (end.Parent != commonAncestor) 151if (start.Parent is Run) 155if (end.Parent is Run) 160Invariant.Assert(start.Parent == end.Parent);
src\Framework\System\Windows\Documents\TextContainer.cs (7)
242textElement = position.Parent as TextElement; 292textElement = position.Parent as TextElement; 942TextElement textElement = position.Parent as TextElement; 2418Invariant.Assert(startPosition.Parent == endPosition.Parent); 2419TextElement textElement = startPosition.Parent as TextElement; 3281element = position.Parent as TextElement;
src\Framework\System\windows\Documents\TextEditorContextMenu.cs (1)
95TextElement element = start.Parent as TextElement;
src\Framework\System\windows\Documents\TextEditorTyping.cs (8)
905(position1.Parent is BlockUIContainer || position2.Parent is BlockUIContainer) && 906position1.Parent != position2.Parent; 1442TableRow row = ((TextPointer)This.Selection.End).Parent as TableRow; 1470TextElement parent = ((TextPointer)This.Selection.Start).Parent as TextElement; 1930pointer.Parent is TextElement && 1931TextSchema.HasHyperlinkAncestor((TextElement)pointer.Parent))
src\Framework\System\Windows\Documents\TextEffectResolver.cs (1)
93effectStart.Parent,
src\Framework\System\Windows\Documents\TextElementEnumerator.cs (1)
157_current = (TextElementType)_navigator.Parent;
src\Framework\System\Windows\Documents\TextPointer.cs (16)
1698/// <para>The <see cref="TextPointer.Parent"/> property for this 1715/// <para>The <see cref="TextPointer.Parent"/> property for this 1741Inline ancestor = this.Parent as Inline; 1754TextElement ancestor = this.Parent as TextElement; 2171if (!((TextElement)this.Parent).IsEmpty) // the parent may be InlineUIContainer or BlockUIContainer 2561element = this.Parent as TextElement; 2578element = this.Parent as TextElement; 3577if (position.Parent == null) 3585Invariant.Assert(position.Parent is Run, "EnsureInsertionPosition() must return a position in text content"); 3586Run run = (Run)position.Parent; 3608TextElement element1 = position1.Parent as TextElement; 3609TextElement element2 = position2.Parent as TextElement; 3615commonAncestor = position1.Parent; 3619commonAncestor = position2.Parent; 3648DependencyObject element = this.Parent; 3897DependencyObject parentBlock = this.Parent;
src\Framework\System\Windows\Documents\TextPointerBase.cs (5)
761if (pointer.Parent is ListItem) 763return (ListItem)pointer.Parent; 777if (position.Parent is ListItem) 779return (ListItem)position.Parent; 796ListItem listItem = position.Parent as ListItem;
src\Framework\System\Windows\Documents\TextRangeBase.cs (9)
457DependencyObject element = ((TextPointer)pointer).Parent as TextElement; 840List list = (List)((TextPointer)navigator).Parent; 1313((TextPointer)thisRange.Start).Parent == ((TextPointer)thisRange.End).Parent && 1314((TextPointer)thisRange.Start).Parent is Run && 1855TextElement outerAnchoredBlock = start.Parent as TextElement; 1868TextElement innerElement = end.Parent as TextElement; 1897outerAnchoredBlock = end.Parent as TextElement; 1910TextElement innerElement = start.Parent as TextElement;
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)
src\Framework\System\Windows\Documents\TextRangeEditLists.cs (3)
611if (end.Parent == startListItem.Parent) 640if (!TextSchema.AllowsParagraphMerging(position.Parent.GetType())) 660if (!TextSchema.AllowsParagraphMerging(position.Parent.GetType()))
src\Framework\System\Windows\Documents\TextRangeEditTables.cs (18)
115TextElement element = position.Parent as TextElement; 127TextElement element = position.Parent as TextElement; 139TextElement element = position.Parent as TextElement; 570TableRow row = (TableRow)selection.MovingPosition.Parent; 636TextElement ancestor = insertionPosition.Parent as TextElement; 750BlockUIContainer blockUIContainer = (BlockUIContainer)position.Parent; 823DependencyObject parent = position.Parent; 832parent = position.Parent; 841parent = position.Parent; 850parent = position.Parent; 859parent = position.Parent; 865parent = position.Parent; 909Run implicitRun = Run.CreateImplicitRun(position.Parent); 2107TableRow movingCellRow = movingPosition.Parent as TableRow; 2139if (anchorPosition.Parent == movingPosition.Parent) 2153TextElement commonAncestor = anchorPosition.Parent as TextElement; 2182TextElement element = position.Parent as TextElement;
src\Framework\System\Windows\Documents\TextRangeSerialization.cs (14)
607WriteTableColumnsInformation(range, (Table)((TextPointer)textReader).Parent, xmlWriter, xamlTypeMapper); 709WriteInheritablePropertiesForFlowDocument((DependencyObject)((TextPointer)context).Parent, xmlWriter, complexProperties); 1333Invariant.Assert(insertionPosition.Parent is Paragraph, "insertionPosition must be in a scope of a Paragraph after splitting formatting elements"); 1445TextSchema.IsFormattingType(positionBeforeParagraph.Parent.GetType())) 1450TextSchema.AllowsParagraphMerging(positionBeforeParagraph.Parent.GetType())) 1473if (insertionPosition.Parent is List) 1485while (navigator != null && !(navigator.Parent is Paragraph)) 1499Invariant.Assert(navigator.Parent is Paragraph, "We suppose have a first paragraph found"); 1500Paragraph firstParagraph = (Paragraph)navigator.Parent; 1503while (navigator != null && !(navigator.Parent is Paragraph)) 1517Invariant.Assert(navigator.Parent is Paragraph, "We suppose a second paragraph found"); 1518Paragraph secondParagraph = (Paragraph)navigator.Parent; 1626if (TextSchema.ValuesAreEqual(start.Parent.GetValue(property), value)) 1639TextElement element = (TextElement)start.Parent;
src\Framework\System\Windows\Documents\TextSchema.cs (1)
161DependencyObject parent = position.Parent;
src\Framework\System\windows\Documents\TextSelection.cs (2)
1430propertyValue = this.Start.Parent.GetValue(formattingProperty); 1467SpringloadCurrentFormatting(start.Parent);
src\Framework\System\Windows\Documents\TextStore.cs (2)
1138TextElement startElement = (TextElement)((TextPointer)start).Parent; 1139TextElement endElement = (TextElement)((TextPointer)end).Parent;
src\Framework\System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (1)
500Table table = (Table) textPointerTable.Parent;
src\Framework\System\Windows\Documents\TextTreePropertyUndoUnit.cs (1)
67position.Parent.ClearValue(_propertyRecord.Property);
src\Framework\System\Windows\Documents\ValidationHelper.cs (1)
118throw new ArgumentException(SR.Get(SRID.TextSchema_ChildTypeIsInvalid, position.Parent.GetType().Name, child.GetType().Name));