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