167 references to Parent
PresentationFramework (167)
src\Framework\MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (1)
429FixedDocumentSequence sequence = document.Parent as FixedDocumentSequence;
src\Framework\MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (1)
351FixedDocumentSequence sequence = fixedDoc.Parent as FixedDocumentSequence;
src\Framework\MS\Internal\Documents\ContentElementCollection.cs (1)
747DependencyObject node = item.Parent;
src\Framework\MS\Internal\Documents\TableColumnCollectionInternal.cs (4)
148if (item.Parent is DummyProxy) 150if (LogicalTreeHelper.GetParent(item.Parent) != Owner) 157if (item.Parent != null) 192DummyProxy proxy = item.Parent as DummyProxy;
src\Framework\MS\Internal\Documents\TableTextElementCollectionInternal.cs (7)
47if (item.Parent != null) 115if (item.Parent != null) 272if (item.Parent is DummyProxy) 274if (LogicalTreeHelper.GetParent(item.Parent) != Owner) 329if (item.Parent is DummyProxy) 331objectSearchFor = item.Parent; 433if (value.Parent != null)
src\Framework\MS\Internal\FrameworkObject.cs (4)
148return _fce.Parent; 291DependencyObject parent = _fce.Parent; 439parent = _fce.Parent; 925logicalParent = _fce.Parent;
src\Framework\MS\Internal\PtsHost\LineBase.cs (2)
197DependencyObject parent = inline.Parent; 275DependencyObject parent = inline.Parent;
src\Framework\MS\Internal\PtsHost\MbpInfo.cs (1)
118DependencyObject parent = ((Paragraph)o).Parent;
src\Framework\MS\Internal\PtsHost\UIElementParagraph.cs (3)
401Figure figure = (Figure) ((BlockUIContainer)Element).Parent; 519Figure figure = (Figure)((BlockUIContainer)Element).Parent; 539DependencyObject parent = ((BlockUIContainer)Element).Parent;
src\Framework\MS\Internal\Text\ComplexLine.cs (2)
423DependencyObject parent = inline.Parent; 496DependencyObject parent = inline.Parent;
src\Framework\MS\Internal\Text\DynamicPropertyReader.cs (2)
246element = ((FrameworkContentElement)element).Parent; 287i = i.Parent as Inline;
src\Framework\System\Windows\Controls\DefinitionBase.cs (6)
170Grid parentGrid = (Grid) definition.Parent; 207Grid parentGrid = (Grid) definition.Parent; 236Grid parentGrid = (Grid) definition.Parent; 797Grid parentGrid = (Grid)(_registry[i].Parent); 897Grid parentGrid = (Grid)definitionBase.Parent; 910Grid parentGrid = (Grid)definitionBase.Parent;
src\Framework\System\Windows\Controls\PopupControlService.cs (2)
980return fce.Parent; 1020o = fce.Parent;
src\Framework\System\Windows\Controls\TreeView.cs (1)
830return fce.Parent;
src\Framework\System\Windows\DescendentsWalkerBase.cs (1)
59logicalParent = (ancestorFCE != null) ? ancestorFCE.Parent : null;
src\Framework\System\Windows\Documents\Block.cs (1)
44if (this.Parent == null)
src\Framework\System\Windows\Documents\FixedDocument.cs (1)
1092FixedDocumentSequence parent = this.Parent as FixedDocumentSequence;
src\Framework\System\Windows\Documents\FlowDocument.cs (3)
869RichTextBox parentRichTextBox = this.Parent as RichTextBox; 1049DependencyObject oldParent = this.Parent; 1658if (value is TextElement && ((TextElement)value).Parent != null)
src\Framework\System\Windows\Documents\Inline.cs (1)
58if (this.Parent == null)
src\Framework\System\Windows\Documents\List.cs (4)
193if (item.Parent != this) 240Invariant.Assert(this.Parent == null, "Cannot Apply List Because It Is Inserted In The Tree Already."); 242Invariant.Assert(firstBlock.Parent == lastBlock.Parent, "Cannot Apply List Because Block Are Not Siblings.");
src\Framework\System\Windows\Documents\ListItem.cs (2)
81return (this.Parent as List); 109if (this.Parent == null)
src\Framework\System\Windows\Documents\Run.cs (1)
279RichTextBox rtb = document.Parent as RichTextBox;
src\Framework\System\Windows\Documents\TableCell.cs (2)
104DependencyObject oldParent = this.Parent; 395internal TableRow Row { get { return Parent as TableRow; } }
src\Framework\System\Windows\Documents\TableColumn.cs (1)
165internal Table Table { get { return Parent as Table; } }
src\Framework\System\Windows\Documents\TableRow.cs (2)
110DependencyObject oldParent = this.Parent; 289return (Parent as TableRowGroup);
src\Framework\System\Windows\Documents\TableRowGroup.cs (2)
261return Parent as Table; 326DependencyObject oldParent = this.Parent;
src\Framework\System\windows\Documents\TextEditorContextMenu.cs (1)
105element = element.Parent as TextElement;
src\Framework\System\windows\Documents\TextEditorLists.cs (3)
146List list = parentListItem == null ? null : (List)parentListItem.Parent; 183if (list.Parent is ListItem) 212if (list.Parent is ListItem)
src\Framework\System\windows\Documents\TextEditorMouse.cs (1)
815hitElement = ((FrameworkContentElement)hitElement).Parent;
src\Framework\System\windows\Documents\TextEditorTyping.cs (1)
1473parent = parent.Parent as TextElement;
src\Framework\System\Windows\Documents\TextElement.cs (8)
1180for (element = element1; element.Parent is TextElement; element = (TextElement)element.Parent) 1184for (element = element2; element.Parent is TextElement; element = (TextElement)element.Parent) 1193element1 = (TextElement)element1.Parent; 1199element2 = (TextElement)element2.Parent; 1206element1 = element1.Parent as TextElement; 1207element2 = element2.Parent as TextElement;
src\Framework\System\Windows\Documents\TextElementCollection.cs (8)
209if (item.Parent != this.Parent) 258if (previousSibling.Parent != this.Parent) 263if (newItem.Parent != null) 303if (nextSibling.Parent != this.Parent) 308if (newItem.Parent != null) 488if (newItem.Parent != null) 715return _isOwnerParent ? _owner : ((TextElement)_owner).Parent; 1039return _index >= 0 && TextElementCollectionHelper.IsCleanParent(_element.Parent, collection);
src\Framework\System\Windows\Documents\TextPointer.cs (4)
1409if (textElement.Parent != null) 1745ancestor = ancestor.Parent as Inline; 1758ancestor = ancestor.Parent as TextElement; 3901parentBlock = ((Inline)parentBlock).Parent;
src\Framework\System\Windows\Documents\TextPointerBase.cs (3)
768return paragraphOrBlockUIContainer == null ? null : (paragraphOrBlockUIContainer.Parent as ListItem); 783if (paragraphOrBlockUIContainer != null && paragraphOrBlockUIContainer.Parent is ListItem && 786return (ListItem)paragraphOrBlockUIContainer.Parent;
src\Framework\System\Windows\Documents\TextRangeBase.cs (7)
462element = element is TextElement ? ((TextElement)element).Parent : null; 1861outerAnchoredBlock = outerAnchoredBlock.Parent as TextElement; 1875innerElement = innerElement.Parent as TextElement; 1892outerAnchoredBlock = outerAnchoredBlock.Parent as TextElement; 1903outerAnchoredBlock = outerAnchoredBlock.Parent as TextElement; 1917innerElement = innerElement.Parent as TextElement; 1934outerAnchoredBlock = outerAnchoredBlock.Parent as TextElement;
src\Framework\System\Windows\Documents\TextRangeEdit.cs (27)
331if (inline.Parent != null && 332TextSchema.IsMergeableInline(inline.Parent.GetType()) && 333TextSchema.IsKnownType(inline.Parent.GetType()) && 339Span parentSpan = (Span)inline.Parent; 341if (parentSpan.Parent == null) 364object outerValue = parentSpan.Parent.GetValue(property); 405inline = inline.Parent as Inline; 984Span span = firstChild.Parent as Span; 1756((run.Parent != null && HasLocalInheritableStructuralPropertyValue(run)) || 1757(run.Parent == null && HasLocalStructuralPropertyValue(run)))) 1772((((Inline)splitPosition.Parent).Parent != null && !HasLocalInheritableStructuralPropertyValue((Inline)splitPosition.Parent)) || 1773(((Inline)splitPosition.Parent).Parent == null && !HasLocalStructuralPropertyValue((Inline)splitPosition.Parent))))) 1784bool sourceIsChild = (source.Parent == destination); 1821if (!TextSchema.ValuesAreEqual(inline.GetValue(inheritableProperty), inline.Parent.GetValue(inheritableProperty))) 1863while ((FlowDirection)inline.Parent.GetValue(FrameworkElement.FlowDirectionProperty) == flowDirection) 1865inline = (Span)inline.Parent; 1981for (Inline searchInline = inline; searchInline != null; searchInline = searchInline.Parent as Span) 1993for (Inline searchInline = inline; searchInline != null; searchInline = searchInline.Parent as Span) 2009Span parent = inline.Parent as Span; 2015parent = parent.Parent as Span; 2040for (Span parent = child.Parent as Span; 2042parent = parent.Parent as Span) 2053TextElement limit = (TextElement)conflictingParent.Parent; 2150start = SplitFormattingElements(start, /*keepEmptyFormatting:*/false, /*limitingAncestor*/run.Parent as TextElement); 2151end = SplitFormattingElements(end, /*keepEmptyFormatting:*/false, /*limitingAncestor*/run.Parent as TextElement); 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 (31)
55ListItem secondListItem = secondParagraphOrBlockUIContainer.PreviousBlock == null ? secondParagraphOrBlockUIContainer.Parent as ListItem : null; 82TextElement parentBlock = (TextElement)secondParagraphOrBlockUIContainer.Parent; 255if (firstBlock != null && lastBlock != null && firstBlock.Parent == lastBlock.Parent) 285if (firstBlock == null || lastBlock == null || firstBlock.Parent != lastBlock.Parent || 286firstBlock.Parent is ListItem && firstBlock.PreviousBlock == null) 303ListItem parentListItem = firstBlock.Parent as ListItem; 314Invariant.Assert(block.Parent is ListItem); 345if (firstListItem == null || lastListItem == null || firstListItem.Parent != lastListItem.Parent || !(firstListItem.Parent is List)) 404firstListItem.Parent != lastListItem.Parent || 405!(firstListItem.Parent is List)) 419List list = (List)firstListItem.Parent; 472TextElement parent = (TextElement)lastListItem.Parent; 474while (parent != firstListItem.Parent) 477parent = (TextElement)parent.Parent; 499List unindentedList = (List)firstListItem.Parent; 502ListItem outerListItem = unindentedList.Parent as ListItem; 595if (startListItem != null && endListItem != null && startListItem.Parent == endListItem.Parent) 611if (end.Parent == startListItem.Parent) 686startListItem.List.Parent is ListItem) 714endListItem.List.Parent is ListItem) 735Invariant.Assert(!(startListItem.List.Parent is ListItem), "startListItem's list must not be nested!"); 744if (endListItem.List.Parent is ListItem) 746while (endListItem.List != null && endListItem.List.Parent is ListItem) 748endListItem = (ListItem)endListItem.List.Parent; 753Invariant.Assert(!(endListItem.List.Parent is ListItem), "endListItem's list must not be nested!");
src\Framework\System\Windows\Documents\TextRangeEditTables.cs (6)
118element = element.Parent as TextElement; 130element = element.Parent as TextElement; 142element = element.Parent as TextElement; 647ancestor = ancestor.Parent as TextElement; 2156commonAncestor = commonAncestor.Parent as TextElement; 2214element = element.Parent as TextElement;
src\Framework\System\Windows\Documents\TextRangeSerialization.cs (2)
1583Invariant.Assert(propertyBag.IsEmpty && propertyBag.Parent == null, "propertyBag is supposed to be an empty element outside any tree"); 1643!TextSchema.ValuesAreEqual(element.GetValue(property), element.Parent.GetValue(property)))
src\Framework\System\Windows\Documents\TextSchema.cs (1)
248ancestor = ancestor.Parent as Inline;
src\Framework\System\windows\Documents\TextSelection.cs (1)
1517element = ((TextElement)element).Parent;
src\Framework\System\Windows\Documents\ValidationHelper.cs (1)
124if (((TextElement)child).Parent != null)
src\Framework\System\Windows\Generated\FrameworkContentElement.cs (2)
699DependencyObject parent = Parent; 728DependencyObject parent = Parent;
src\Framework\System\Windows\Input\KeyboardNavigation.cs (1)
180return GetVisualRoot(fce.Parent);
src\Framework\System\Windows\LogicalTreeHelper.cs (1)
146return fce.Parent;