176 references to Parent
PresentationFramework (176)
MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (2)
120
list.Add(((TextPointer)start).
Parent
);
128
DependencyObject node = current.
Parent
;
MS\Internal\PtsHost\ContainerParagraph.cs (1)
1029
Invariant.Assert(Element == ((TextPointer)textPointer).
Parent
);
MS\Internal\PtsHost\Line.cs (1)
601
element = position.
Parent
;
MS\Internal\PtsHost\ListParagraph.cs (1)
108
if (Element == ((TextPointer)textPointer).
Parent
)
MS\Internal\Text\ComplexLine.cs (1)
302
element = position.
Parent
as TextElement;
System\Windows\Controls\TextBlock.cs (3)
2819
if (!(position is TextPointer) || ((TextPointer)position).
Parent
== null || ((TextPointer)position).
Parent
is TextBox)
2827
Run implicitRun = Inline.CreateImplicitRun(((TextPointer)position).
Parent
);
System\Windows\Documents\ColumnResizeUndoUnit.cs (1)
47
table = (Table) textPointerTable.
Parent
;
System\Windows\Documents\RangeContentEnumerator.cs (3)
125
_currentCache = _navigator.
Parent
;
190
_navigator.MoveToPosition(((TextElement)_navigator.
Parent
).ElementEnd);
318
DependencyObject node = _start.
Parent
;
System\Windows\Documents\Span.cs (10)
104
Invariant.Assert(start.
Parent
is Run);
106
Invariant.Assert(end.
Parent
is Run);
124
TextElement commonAncestor = TextElement.GetCommonAncestor((TextElement)start.
Parent
, (TextElement)end.
Parent
);
126
while (start.
Parent
!= commonAncestor)
130
while (end.
Parent
!= commonAncestor)
135
if (start.
Parent
is Run)
139
if (end.
Parent
is Run)
144
Invariant.Assert(start.
Parent
== end.
Parent
);
System\Windows\Documents\TextContainer.cs (7)
225
textElement = position.
Parent
as TextElement;
272
textElement = position.
Parent
as TextElement;
922
TextElement textElement = position.
Parent
as TextElement;
2380
Invariant.Assert(startPosition.
Parent
== endPosition.
Parent
);
2381
TextElement textElement = startPosition.
Parent
as TextElement;
3233
element = position.
Parent
as TextElement;
System\windows\Documents\TextEditorContextMenu.cs (1)
84
TextElement element = start.
Parent
as TextElement;
System\windows\Documents\TextEditorTyping.cs (8)
870
(position1.
Parent
is BlockUIContainer || position2.
Parent
is BlockUIContainer) &&
871
position1.
Parent
!= position2.
Parent
;
1404
TableRow row = ((TextPointer)This.Selection.End).
Parent
as TableRow;
1432
TextElement parent = ((TextPointer)This.Selection.Start).
Parent
as TextElement;
1879
pointer.
Parent
is TextElement &&
1880
TextSchema.HasHyperlinkAncestor((TextElement)pointer.
Parent
))
System\Windows\Documents\TextEffectResolver.cs (1)
80
effectStart.
Parent
,
System\Windows\Documents\TextElementEnumerator.cs (1)
141
_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
1722
Inline ancestor = this.
Parent
as Inline;
1735
TextElement ancestor = this.
Parent
as TextElement;
2146
if (!((TextElement)this.
Parent
).IsEmpty) // the parent may be InlineUIContainer or BlockUIContainer
2530
element = this.
Parent
as TextElement;
2547
element = this.
Parent
as TextElement;
3546
if (position.
Parent
== null)
3554
Invariant.Assert(position.
Parent
is Run, "EnsureInsertionPosition() must return a position in text content");
3555
Run run = (Run)position.
Parent
;
3577
TextElement element1 = position1.
Parent
as TextElement;
3578
TextElement element2 = position2.
Parent
as TextElement;
3584
commonAncestor = position1.
Parent
;
3588
commonAncestor = position2.
Parent
;
3617
DependencyObject element = this.
Parent
;
3866
DependencyObject parentBlock = this.
Parent
;
System\Windows\Documents\TextPointerBase.cs (5)
754
if (pointer.
Parent
is ListItem)
756
return (ListItem)pointer.
Parent
;
770
if (position.
Parent
is ListItem)
772
return (ListItem)position.
Parent
;
789
ListItem listItem = position.
Parent
as ListItem;
System\Windows\Documents\TextRangeBase.cs (9)
443
DependencyObject element = ((TextPointer)pointer).
Parent
as TextElement;
826
List list = (List)((TextPointer)navigator).
Parent
;
1296
((TextPointer)thisRange.Start).
Parent
== ((TextPointer)thisRange.End).
Parent
&&
1297
((TextPointer)thisRange.Start).
Parent
is Run &&
1823
TextElement outerAnchoredBlock = start.
Parent
as TextElement;
1836
TextElement innerElement = end.
Parent
as TextElement;
1865
outerAnchoredBlock = end.
Parent
as TextElement;
1878
TextElement innerElement = start.
Parent
as TextElement;
System\Windows\Documents\TextRangeEdit.cs (62)
56
Invariant.Assert(splitPosition.
Parent
!= null && TextSchema.IsMergeableInline(splitPosition.
Parent
.GetType()));
58
Inline inline = (Inline)splitPosition.
Parent
;
166
Inline inline = position.
Parent
as Inline;
176
inline = position.
Parent
as Inline;
190
inline = position.
Parent
as Inline;
201
inline = position.
Parent
as Inline;
232
start.
Parent
is Run &&
233
start.
Parent
== end.
Parent
&& TextSchema.ValuesAreEqual(start.
Parent
.GetValue(formattingProperty), value))
264
TextSchema.IsMergeableInline(position.
Parent
.GetType()))
266
position = ((Inline)position.
Parent
).ElementStart;
269
TextSchema.IsMergeableInline(position.
Parent
.GetType()))
271
position = ((Inline)position.
Parent
).ElementEnd;
323
Inline inline = position.
Parent
as Inline;
420
TextElement parent = (TextElement)start.
Parent
;
524
TextElement element = (TextElement)position.
Parent
;
637
Invariant.Assert(breakPosition.
Parent
== paragraph, "breakPosition must be in paragraph scope after splitting formatting elements");
649
Invariant.Assert(breakPosition.
Parent
is ListItem, "breakPosition must be in ListItem scope");
656
while (!(breakPosition.
Parent
is Paragraph) && breakPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart)
1033
block = pointer.
Parent
as Block;
1279
TextSchema.IsMergeableInline(position.
Parent
.GetType()))
1281
position = ((Inline)position.
Parent
).ElementStart;
1284
TextSchema.IsMergeableInline(position.
Parent
.GetType()))
1286
position = ((Inline)position.
Parent
).ElementEnd;
1288
TextElement commonAncestor = position.
Parent
as TextElement;
1303
Run previousRun = previousPosition.
Parent
as Run;
1312
Run nextRun = nextPosition.
Parent
as Run;
1443
TextElement parent = (TextElement)startPosition.
Parent
;
1493
if (startPosition.
Parent
is BlockUIContainer && ((BlockUIContainer)startPosition.
Parent
).IsEmpty)
1495
((BlockUIContainer)startPosition.
Parent
).Reposition(null, null);
1497
else if (startPosition.
Parent
is Hyperlink && ((Hyperlink)startPosition.
Parent
).IsEmpty)
1499
((Hyperlink)startPosition.
Parent
).Reposition(null, null);
1571
if (start.
Parent
== end.
Parent
)
1615
Invariant.Assert(previousPosition.
Parent
== nextPosition.
Parent
, "inconsistent position Parents: previous and next");
1627
Invariant.Assert(nextPosition.
Parent
== end.
Parent
, "inconsistent poaition Parents: next and end");
1666
Invariant.Assert(previousPosition.
Parent
== nextPosition.
Parent
, "inconsistent Parents: previousPosition, nextPosition");
1689
Invariant.Assert(one.
Parent
== two.
Parent
, "inconsistent Parents: one and two");
1750
Run run = splitPosition.
Parent
as Run;
1766
while (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
)))))
2092
Invariant.Assert(pointer.
Parent
is Run);
2093
run = pointer.
Parent
as Run;
2119
TextSchema.IsFormattingType(start.
Parent
.GetType())) // look for Run/Span elements
2121
start.
Parent
.ClearValue(formattingProperty);
2235
start.
Parent
is Paragraph)
2237
Paragraph paragraph = (Paragraph)start.
Parent
;
2265
for (parent = (Inline)start.
Parent
; parent != commonAncestor; parent = (Inline)parent.Parent)
2276
for (parent = (Inline)end.
Parent
; parent != commonAncestor; parent = (Inline)parent.Parent)
System\Windows\Documents\TextRangeEditLists.cs (3)
609
if (end.
Parent
== startListItem.Parent)
638
if (!TextSchema.AllowsParagraphMerging(position.
Parent
.GetType()))
658
if (!TextSchema.AllowsParagraphMerging(position.
Parent
.GetType()))
System\Windows\Documents\TextRangeEditTables.cs (18)
110
TextElement element = position.
Parent
as TextElement;
122
TextElement element = position.
Parent
as TextElement;
134
TextElement element = position.
Parent
as TextElement;
565
TableRow row = (TableRow)selection.MovingPosition.
Parent
;
631
TextElement ancestor = insertionPosition.
Parent
as TextElement;
749
BlockUIContainer blockUIContainer = (BlockUIContainer)position.
Parent
;
822
DependencyObject parent = position.
Parent
;
831
parent = position.
Parent
;
840
parent = position.
Parent
;
849
parent = position.
Parent
;
858
parent = position.
Parent
;
864
parent = position.
Parent
;
908
Run implicitRun = Run.CreateImplicitRun(position.
Parent
);
2106
TableRow movingCellRow = movingPosition.
Parent
as TableRow;
2138
if (anchorPosition.
Parent
== movingPosition.
Parent
)
2152
TextElement commonAncestor = anchorPosition.
Parent
as TextElement;
2181
TextElement element = position.
Parent
as TextElement;
System\Windows\Documents\TextRangeSerialization.cs (14)
595
WriteTableColumnsInformation(range, (Table)((TextPointer)textReader).
Parent
, xmlWriter, xamlTypeMapper);
697
WriteInheritablePropertiesForFlowDocument((DependencyObject)((TextPointer)context).
Parent
, xmlWriter, complexProperties);
1303
Invariant.Assert(insertionPosition.
Parent
is Paragraph, "insertionPosition must be in a scope of a Paragraph after splitting formatting elements");
1415
TextSchema.IsFormattingType(positionBeforeParagraph.
Parent
.GetType()))
1420
TextSchema.AllowsParagraphMerging(positionBeforeParagraph.
Parent
.GetType()))
1443
if (insertionPosition.
Parent
is List)
1455
while (navigator != null && !(navigator.
Parent
is Paragraph))
1469
Invariant.Assert(navigator.
Parent
is Paragraph, "We suppose have a first paragraph found");
1470
Paragraph firstParagraph = (Paragraph)navigator.
Parent
;
1473
while (navigator != null && !(navigator.
Parent
is Paragraph))
1487
Invariant.Assert(navigator.
Parent
is Paragraph, "We suppose a second paragraph found");
1488
Paragraph secondParagraph = (Paragraph)navigator.
Parent
;
1600
if (TextSchema.ValuesAreEqual(start.
Parent
.GetValue(property), value))
1613
TextElement element = (TextElement)start.
Parent
;
System\Windows\Documents\TextSchema.cs (1)
158
DependencyObject parent = position.
Parent
;
System\windows\Documents\TextSelection.cs (2)
1409
propertyValue = this.Start.
Parent
.GetValue(formattingProperty);
1446
SpringloadCurrentFormatting(start.
Parent
);
System\Windows\Documents\TextStore.cs (2)
1252
TextElement startElement = (TextElement)((TextPointer)start).
Parent
;
1253
TextElement endElement = (TextElement)((TextPointer)end).
Parent
;
System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (1)
475
Table table = (Table) textPointerTable.
Parent
;
System\Windows\Documents\TextTreePropertyUndoUnit.cs (1)
60
position.
Parent
.ClearValue(_propertyRecord.Property);
System\Windows\Documents\ValidationHelper.cs (1)
108
throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, position.
Parent
.GetType().Name, child.GetType().Name));