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