426 references to VisualTreeHelper
PresentationCore (75)
Core\CSharp\MS\Internal\Automation\ElementUtil.cs (5)
65
return
VisualTreeHelper
.GetParent(el) as Visual;
93
Visual parent =
VisualTreeHelper
.GetParent(el) as Visual;
107
Visual parent =
VisualTreeHelper
.GetParent(el) as Visual;
123
Visual test =
VisualTreeHelper
.GetParent(scan) as Visual;
184
PointHitTestResult result = VisualTreeUtils.AsNearestPointHitTestResult(
VisualTreeHelper
.HitTest(root, pointRoot));
Core\CSharp\MS\Internal\DeferredElementTreeState.cs (2)
32
parent =
VisualTreeHelper
.GetParent(v);
46
parent =
VisualTreeHelper
.GetParent(v3D);
Core\CSharp\MS\Internal\Ink\Renderer.cs (5)
387
=
VisualTreeHelper
.GetParent(visual) as ContainerVisual;
604
&& (
VisualTreeHelper
.GetParent(precedingVisual) != null))
606
VisualCollection children = ((ContainerVisual)(
VisualTreeHelper
.GetParent(precedingVisual))).Children;
628
ContainerVisual parent = (ContainerVisual)(
VisualTreeHelper
.GetParent(visual));
693
else if (
VisualTreeHelper
.GetParent(hcVisual) == null)
Core\CSharp\MS\Internal\Media3D\GeneralTransform2Dto3Dto2D.cs (1)
125
Viewport3DVisual viewport3D = (Viewport3DVisual)
VisualTreeHelper
.GetContainingVisual2D(visual3D);
Core\CSharp\MS\Internal\Media3D\M3DUtil.cs (1)
545
dependencyObject =
VisualTreeHelper
.GetParent(dependencyObject);
Core\CSharp\MS\Internal\UIElementHelper.cs (1)
83
reference =
VisualTreeHelper
.GetParent(reference);
Core\CSharp\System\Windows\Automation\Peers\UIElement3DAutomationPeer.cs (4)
101
int count =
VisualTreeHelper
.GetChildrenCount(parent);
104
DependencyObject child =
VisualTreeHelper
.GetChild(parent, i);
210
Rect rectRoot = PointUtil.ElementToRoot(rectElement,
VisualTreeHelper
.GetContainingVisual2D(_owner), presentationSource);
268
reference =
VisualTreeHelper
.GetParent(reference);
Core\CSharp\System\Windows\Automation\Peers\UIElementAutomationPeer.cs (5)
125
int count =
VisualTreeHelper
.GetChildrenCount(parent);
128
DependencyObject child =
VisualTreeHelper
.GetChild(parent, i);
297
DependencyObject parent =
VisualTreeHelper
.GetParent(owner);
307
Geometry clipGeometry =
VisualTreeHelper
.GetClip(visualParent);
327
parent =
VisualTreeHelper
.GetParent(parent);
Core\CSharp\System\Windows\Diagnostics\VisualDiagnostics.cs (3)
139
isPotentialOuterChange: (changeType==VisualTreeChangeType.Add && index==0 &&
VisualTreeHelper
.GetParent(parent) == null));
195
int count =
VisualTreeHelper
.GetChildrenCount(parent);
198
DependencyObject obj =
VisualTreeHelper
.GetChild(parent, i);
Core\CSharp\System\Windows\Documents\DocumentPage.cs (1)
109
return
VisualTreeHelper
.GetContentBounds(_visual).Size;
Core\CSharp\System\Windows\Input\FocusManager.cs (2)
354
dependencyObject =
VisualTreeHelper
.GetParent(dependencyObject);
407
DependencyObject visualParent =
VisualTreeHelper
.GetParent(d);
Core\CSharp\System\Windows\Input\InputElement.cs (7)
86
DependencyObject parent =
VisualTreeHelper
.GetParent(v);
94
DependencyObject parent =
VisualTreeHelper
.GetParent(v3D);
136
DependencyObject parent =
VisualTreeHelper
.GetParent(v);
144
DependencyObject parent =
VisualTreeHelper
.GetParent(v3D);
221
while(rootVisual != null && ((parentVisual =
VisualTreeHelper
.GetParent(rootVisual)) != null))
272
vFrom =
VisualTreeHelper
.GetContainingVisual2D(vFromAsDO);
348
vToAsVisual =
VisualTreeHelper
.GetContainingVisual2D(vTo);
Core\CSharp\System\Windows\Input\Manipulation.cs (1)
354
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
Core\CSharp\System\Windows\Input\TouchDevice.cs (1)
1304
currentChild =
VisualTreeHelper
.GetParent(currentChild);
Core\CSharp\System\Windows\Interop\HwndMouseInputProvider.cs (1)
354
GeneralTransform gDown = inputSource.RootVisual.TransformToDescendant(
VisualTreeHelper
.GetContainingVisual2D(containingVisual));
Core\CSharp\System\Windows\Interop\HwndTarget.cs (2)
1981
int childrenCount =
VisualTreeHelper
.GetChildrenCount(d);
1984
DependencyObject child =
VisualTreeHelper
.GetChild(d, i);
Core\CSharp\System\Windows\Media\BitmapCacheBrush.cs (4)
219
((
VisualTreeHelper
.GetParent(element) == null && !(element.IsRootElement)) // element is not connected to visual tree, OR
220
|| (
VisualTreeHelper
.GetParent(element) is Visual3D) // element is a 2D child of a 3D object, OR
221
|| (
VisualTreeHelper
.GetParent(element) == InternalTarget))) // element is only connected to visual tree via our wrapper Visual
274
DependencyObject parent =
VisualTreeHelper
.GetParent(element);
Core\CSharp\System\Windows\Media\Visual.cs (6)
1928
VisualTreeHelper
.HitTest(
4553
while ((
VisualTreeHelper
.GetParent(g) != null) && (g != ancestor))
4632
g =
VisualTreeHelper
.GetContainingVisual2D(gAsVisual3D);
4729
Viewport2DVisual3D containingVisual3D =
VisualTreeHelper
.GetContainingVisual3D(this) as Viewport2DVisual3D;
5159
e =
VisualTreeHelper
.GetParent(e);
5228
e =
VisualTreeHelper
.GetParent(e);
Core\CSharp\System\Windows\Media\VisualBrush.cs (3)
202
((
VisualTreeHelper
.GetParent(element) == null && !(element.IsRootElement))
203
|| (
VisualTreeHelper
.GetParent(element) is Visual3D)))
242
DependencyObject parent =
VisualTreeHelper
.GetParent(element);
Core\CSharp\System\Windows\Media\VisualCollection.cs (1)
450
Visual oldParent =
VisualTreeHelper
.GetContainingVisual2D(child._parent);
Core\CSharp\System\Windows\Media\VisualTreeHelper.cs (2)
193
reference =
VisualTreeHelper
.GetParent(reference);
212
reference =
VisualTreeHelper
.GetParent(reference);
Core\CSharp\System\Windows\Media3D\Visual3D.cs (6)
475
Debug.Assert(
VisualTreeHelper
.GetParent(this) != null, "If oldParent is null, current parent should != null.");
480
VisualTreeHelper
.GetParent(this),
828
Viewport3DVisual viewport3DVisual = (Viewport3DVisual)
VisualTreeHelper
.GetContainingVisual2D(this);
1709
while ((
VisualTreeHelper
.GetParent(g) != null) && (g != ancestor))
1721
g =
VisualTreeHelper
.GetParent(gAsVisual3D);
1738
Visual3D containing3DParent =
VisualTreeHelper
.GetContainingVisual3D(gAsVisual);
Core\CSharp\System\Windows\Navigation\BaseUriHelper.cs (1)
649
doCurrent =
VisualTreeHelper
.GetParent(vis);
Core\CSharp\System\Windows\UIElement.cs (7)
734
for(Visual v =
VisualTreeHelper
.GetParent(this) as Visual; v != null; v =
VisualTreeHelper
.GetParent(v) as Visual)
752
for(Visual v =
VisualTreeHelper
.GetParent(this) as Visual; v != null; v =
VisualTreeHelper
.GetParent(v) as Visual)
1566
if(parent != null &&
VisualTreeHelper
.IsAncestorOf(e.Ancestor, parent))
2074
VisualTreeHelper
.HitTest(this,
2147
candidate =
VisualTreeHelper
.GetParentInternal(candidate);
Core\CSharp\System\Windows\UIElement3D.cs (1)
261
if (parent != null &&
VisualTreeHelper
.IsAncestorOf(e.Ancestor, parent))
Shared\MS\Internal\PointUtil.cs (2)
156
Transform transform =
VisualTreeHelper
.GetTransform(v);
163
Vector offset =
VisualTreeHelper
.GetOffset(v);
PresentationFramework (287)
src\Framework\MS\Internal\Annotations\Anchoring\PathNode.cs (1)
253
parent =
VisualTreeHelper
.GetParent(visual);
src\Framework\MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (2)
214
int count =
VisualTreeHelper
.GetChildrenCount(dpv);
216
return
VisualTreeHelper
.GetChild(dpv, 0) as DocumentPageHost;
src\Framework\MS\Internal\Annotations\Component\AdornerPresentationContext.cs (5)
163
Visual parent =
VisualTreeHelper
.GetParent(_adornerLayer) as Visual;
414
int count =
VisualTreeHelper
.GetChildrenCount(_adornerLayer);
420
DependencyObject child =
VisualTreeHelper
.GetChild(_adornerLayer, i);
473
int count =
VisualTreeHelper
.GetChildrenCount(adornerLayer);
479
DependencyObject child =
VisualTreeHelper
.GetChild(adornerLayer, i);
src\Framework\MS\Internal\Annotations\Component\AnnotationAdorner.cs (1)
184
AdornerLayer adornerLayer = (AdornerLayer)
VisualTreeHelper
.GetParent(this);
src\Framework\MS\Internal\Controls\InkCanvasFeedbackAdorner.cs (2)
130
UIElement parent = ((UIElement)
VisualTreeHelper
.GetParent(this)) as UIElement;
134
( (UIElement)
VisualTreeHelper
.GetParent(this) ).InvalidateArrange( );
src\Framework\MS\Internal\Controls\InkCanvasInnerCanvas.cs (2)
264
HitTestResult hitTestResult =
VisualTreeHelper
.HitTest(this, point);
284
DependencyObject parent =
VisualTreeHelper
.GetParent(currentObject);
src\Framework\MS\Internal\Data\CommitManager.cs (1)
143
bool result = (ancestor == null) ||
VisualTreeHelper
.IsAncestorOf(ancestor, element);
src\Framework\MS\Internal\Data\ObjectRef.cs (3)
271
ContentPresenter cp =
VisualTreeHelper
.IsVisualType(dd) ?
VisualTreeHelper
.GetParent(dd) as ContentPresenter : null;
528
DependencyObject layout = (v != null) ?
VisualTreeHelper
.GetParent(v) : null;
src\Framework\MS\Internal\Documents\ContentHostHelper.cs (2)
103
if (
VisualTreeHelper
.GetChildrenCount(textView.RenderScope) > 0)
105
ich =
VisualTreeHelper
.GetChild(textView.RenderScope, 0) as IContentHost;
src\Framework\MS\Internal\Documents\DocumentGrid.cs (3)
1345
if (
VisualTreeHelper
.GetParent(this) != null)
2694
HitTestResult result =
VisualTreeHelper
.HitTest(this, point);
2708
currentVisual =
VisualTreeHelper
.GetParent(currentVisual);
src\Framework\MS\Internal\Documents\DocumentPageHost.cs (4)
53
Visual currentParent =
VisualTreeHelper
.GetParent(pageVisual) as Visual;
59
DocumentPageHost docPageHost =
VisualTreeHelper
.GetParent(pageVisualHost) as DocumentPageHost;
90
pageVisualHost =
VisualTreeHelper
.GetParent(_pageVisual) as ContainerVisual;
129
return
VisualTreeHelper
.GetParent(_pageVisual) as Visual;
src\Framework\MS\Internal\Documents\DocumentViewerHelper.cs (6)
364
VisualTreeHelper
.IsAncestorOf(findToolBarHost, focusedElement))
372
VisualTreeHelper
.IsAncestorOf(findToolBarHost, focusedElement))
476
Visual visual =
VisualTreeHelper
.GetParent(originalVisual) as Visual;
479
if (
VisualTreeHelper
.GetClip(visual) != null)
486
Rect rectBounds =
VisualTreeHelper
.GetClip(visual).Bounds;
496
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
src\Framework\MS\Internal\Documents\TextDocumentView.cs (1)
567
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
src\Framework\MS\Internal\Documents\UIElementIsland.cs (1)
43
Visual currentParent =
VisualTreeHelper
.GetParent(_child) as Visual;
src\Framework\MS\Internal\FrameworkObject.cs (7)
342
fo.Reset(
VisualTreeHelper
.GetParent(visual));
350
fo.Reset(
VisualTreeHelper
.GetParent(visual3D));
435
parent =
VisualTreeHelper
.GetParent(_fe);
449
parent =
VisualTreeHelper
.GetParent(visual);
457
parent =
VisualTreeHelper
.GetParent(visual3D);
896
visualParent =
VisualTreeHelper
.GetParent(_fe);
905
visualParent = (visual != null) ?
VisualTreeHelper
.GetParent(visual) : null;
src\Framework\MS\Internal\Helper.cs (13)
465
parent =
VisualTreeHelper
.GetParent(v);
543
UIElement child = (
VisualTreeHelper
.GetChildrenCount(element) > 0) ?
VisualTreeHelper
.GetChild(element, 0) as UIElement : null;
560
UIElement child = (
VisualTreeHelper
.GetChildrenCount(element) > 0) ?
VisualTreeHelper
.GetChild(element, 0) as UIElement : null;
1298
int count =
VisualTreeHelper
.GetChildrenCount(searchStart);
1301
descendant =
VisualTreeHelper
.GetChild(searchStart, i) as FrameworkElement;
1326
element =
VisualTreeHelper
.GetParent(element);
1358
Debug.Assert(
VisualTreeHelper
.IsAncestorOf(pathEndElement, pathStartElement), "pathEndElement should be an ancestor of pathStartElement");
1395
element =
VisualTreeHelper
.GetParent(element);
1418
int childrenCount =
VisualTreeHelper
.GetChildrenCount(d);
1421
DependencyObject child =
VisualTreeHelper
.GetChild(d, i);
1472
parent =
VisualTreeHelper
.GetParent(element);
src\Framework\MS\Internal\Ink\InkCanvasSelection.cs (3)
161
Debug.Assert(
VisualTreeHelper
.GetParent(feedbackAdorner) == null,
176
Debug.Assert(
VisualTreeHelper
.GetParent(_inkCanvas.FeedbackAdorner)
194
Debug.Assert(
VisualTreeHelper
.GetParent(feedbackAdorner) == adornerLayer,
src\Framework\MS\Internal\LayoutDump.cs (6)
220
Geometry clip =
VisualTreeHelper
.GetClip(visual);
252
Geometry clip =
VisualTreeHelper
.GetClip(element);
339
int count =
VisualTreeHelper
.GetChildrenCount(visualParent);
425
int count =
VisualTreeHelper
.GetChildrenCount(visual);
840
int count1 =
VisualTreeHelper
.GetChildrenCount(visual);
844
int count2 =
VisualTreeHelper
.GetChildrenCount(rowVisual);
src\Framework\MS\Internal\PtsHost\Line.cs (1)
428
Visual currentParent =
VisualTreeHelper
.GetParent(inlineObject.UIElementIsland) as Visual;
src\Framework\MS\Internal\PtsHost\PtsHelper.cs (1)
295
Visual currentParent =
VisualTreeHelper
.GetParent(paraClient.Visual) as Visual;
src\Framework\MS\Internal\PtsHost\TableParaClient.cs (4)
1686
||
VisualTreeHelper
.GetParent(cellParaClient.Visual) == null )
1688
Visual currentParent =
VisualTreeHelper
.GetParent(cellParaClient.Visual) as Visual;
1702
&&
VisualTreeHelper
.GetParent(cellParaClient.Visual) != null );
1836
&&
VisualTreeHelper
.GetParent(cellParaClient.Visual) != null );
src\Framework\MS\Internal\PtsHost\TextParaClient.cs (7)
2487
int count =
VisualTreeHelper
.GetChildrenCount(Visual);
2500
visual =
VisualTreeHelper
.GetChild(Visual, visualIndex) as LineVisual;
2502
Invariant.Assert(visual != null ||
VisualTreeHelper
.GetChild(Visual, visualIndex) == null);
2517
int count =
VisualTreeHelper
.GetChildrenCount(Visual);
2523
if(
VisualTreeHelper
.GetChild(Visual, visualIndex) is ParagraphElementVisual)
2529
visual =
VisualTreeHelper
.GetChild(temp, visualIndex) as LineVisual;
2531
Invariant.Assert(visual != null ||
VisualTreeHelper
.GetChild(temp, visualIndex) == null);
src\Framework\MS\Internal\PtsHost\UIElementParaClient.cs (1)
125
Visual currentParent =
VisualTreeHelper
.GetParent(uiElementIsland) as Visual;
src\Framework\MS\Internal\Text\ComplexLine.cs (1)
175
Visual currentParent =
VisualTreeHelper
.GetParent(inlineObject.Element) as Visual;
src\Framework\System\Windows\Annotations\AnnotationDocumentPaginator.cs (2)
408
Invariant.Assert(
VisualTreeHelper
.GetChildrenCount(dpv) == 1, "DocumentPageView has no visual children.");
409
DependencyObject firstElement =
VisualTreeHelper
.GetChild(dpv, 0);
src\Framework\System\Windows\Automation\Peers\DocumentAutomationPeer.cs (3)
263
if (
VisualTreeHelper
.GetClip(visual) != null)
270
Rect clipBounds =
VisualTreeHelper
.GetClip(visual).Bounds;
280
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
src\Framework\System\Windows\Automation\Peers\TextElementAutomationPeer.cs (3)
194
if (
VisualTreeHelper
.GetClip(visual) != null)
202
Rect rectBounds =
VisualTreeHelper
.GetClip(visual).Bounds;
214
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
src\Framework\System\Windows\Automation\Peers\TreeViewItemAutomationPeer.cs (2)
91
int count =
VisualTreeHelper
.GetChildrenCount(parent);
94
DependencyObject child =
VisualTreeHelper
.GetChild(parent, i);
src\Framework\System\Windows\BroadcastEventHelper.cs (6)
485
visual =
VisualTreeHelper
.GetContainingVisual2D(visual3D);
587
int count =
VisualTreeHelper
.GetChildrenCount(v);
591
FrameworkElement child =
VisualTreeHelper
.GetChild(v, i) as FrameworkElement;
636
DependencyObject coreParent = (fo.IsFE) ?
VisualTreeHelper
.GetParent(fo.FE) : null;
700
coreParent =
VisualTreeHelper
.GetParent(v);
708
coreParent =
VisualTreeHelper
.GetParent(v3D);
src\Framework\System\Windows\Controls\AdornedElementPlaceholder.cs (1)
238
_templatedAdorner =
VisualTreeHelper
.GetParent(templateParent) as TemplatedAdorner;
src\Framework\System\Windows\Controls\Canvas.cs (1)
205
Canvas p =
VisualTreeHelper
.GetParent(uie) as Canvas;
src\Framework\System\Windows\Controls\ComboBox.cs (4)
241
if (comboBox._clonedElement != null &&
VisualTreeHelper
.GetParent(comboBox._clonedElement) == null)
934
DependencyObject parent =
VisualTreeHelper
.GetParent(_clonedElement);
1619
int count =
VisualTreeHelper
.GetChildrenCount(visual);
1622
strValue += ExtractString((DependencyObject)(
VisualTreeHelper
.GetChild(visual, i)));
src\Framework\System\Windows\Controls\DataGrid.cs (3)
6394
sourceElement =
VisualTreeHelper
.GetParent(sourceElement) as UIElement;
6626
element =
VisualTreeHelper
.GetParent(row) as UIElement;
6647
element =
VisualTreeHelper
.GetParent(cell) as UIElement;
src\Framework\System\Windows\Controls\DataGridCellsPanel.cs (4)
89
UIElement parent =
VisualTreeHelper
.GetParent(this) as UIElement;
717
if (isRecycled &&
VisualTreeHelper
.GetParent(container) != null)
739
if (isRecycled &&
VisualTreeHelper
.GetParent(container) != null)
1863
return
VisualTreeHelper
.GetParent(row) as DataGridRowsPresenter;
src\Framework\System\Windows\Controls\DataGridColumnFloatingHeader.cs (1)
149
Vector offset =
VisualTreeHelper
.GetOffset(_referenceHeader);
src\Framework\System\Windows\Controls\DataGridHelper.cs (6)
186
parent =
VisualTreeHelper
.GetParent(parent) as UIElement;
220
int childCount =
VisualTreeHelper
.GetChildrenCount(element);
223
DependencyObject child =
VisualTreeHelper
.GetChild(element, i) as DependencyObject;
311
return
VisualTreeHelper
.GetParent(element) as DataGridCellsPanel;
573
return
VisualTreeHelper
.IsAncestorOf(element, contextElement, typeof(T));
666
VisualTreeHelper
.IsAncestorOf(cell, targetElement, typeof(DataGridCell)))
src\Framework\System\Windows\Controls\DockPanel.cs (1)
136
DockPanel p =
VisualTreeHelper
.GetParent(uie) as DockPanel;
src\Framework\System\Windows\Controls\FlowDocumentScrollViewer.cs (2)
1305
if (RenderScope != null &&
VisualTreeHelper
.GetChildrenCount(RenderScope) > 0)
1307
ich =
VisualTreeHelper
.GetChild(RenderScope, 0) as IContentHost;
src\Framework\System\Windows\Controls\Grid.cs (2)
3047
Grid grid =
VisualTreeHelper
.GetParent(child) as Grid;
4225
Grid grid =
VisualTreeHelper
.GetParent(this) as Grid;
src\Framework\System\Windows\Controls\GridSplitter.cs (1)
483
AdornerLayer layer =
VisualTreeHelper
.GetParent(_resizeData.Adorner) as AdornerLayer;
src\Framework\System\Windows\Controls\GridViewColumnHeader.cs (1)
882
Vector offsetVector =
VisualTreeHelper
.GetOffset(FloatSourceHeader);
src\Framework\System\Windows\Controls\GridViewHeaderRowPresenter.cs (1)
929
Visual parent =
VisualTreeHelper
.GetParent(headerAsVisual) as Visual;
src\Framework\System\Windows\Controls\GroupItem.cs (2)
382
parent =
VisualTreeHelper
.GetParent(parent);
398
DependencyObject parentPanel =
VisualTreeHelper
.GetParent(this);
src\Framework\System\Windows\Controls\InkCanvas.cs (1)
579
InkCanvasInnerCanvas p =
VisualTreeHelper
.GetParent(uie) as InkCanvasInnerCanvas;
src\Framework\System\Windows\Controls\ItemContainerGenerator.cs (2)
2741
DependencyObject parent =
VisualTreeHelper
.GetParentInternal(container);
2753
if (parent == null ||
VisualTreeHelper
.GetParentInternal(container) != parent)
src\Framework\System\Windows\Controls\ItemsControl.cs (7)
1188
ui =
VisualTreeHelper
.GetParent(ui) as UIElement;
1344
Visual parent =
VisualTreeHelper
.GetParent(visual) as Visual;
2004
DependencyObject startingParent =
VisualTreeHelper
.GetParent(startingElement);
2014
startingParent =
VisualTreeHelper
.GetParent(startingParent);
3259
for (DependencyObject current = _itemsHost; current != this && current != null; current =
VisualTreeHelper
.GetParent(current))
3362
element =
VisualTreeHelper
.GetParent(element) as FrameworkElement;
3391
element =
VisualTreeHelper
.GetParent(element) as FrameworkElement;
src\Framework\System\Windows\Controls\ItemsPresenter.cs (4)
52
if (panel == null ||
VisualTreeHelper
.GetChildrenCount(panel) > 0)
183
Visual parent =
VisualTreeHelper
.GetParent(groupItem) as Visual;
187
return
VisualTreeHelper
.GetParent(parent) as ItemsPresenter;
292
ScrollContentPresenter scp =
VisualTreeHelper
.GetParent(this) as ScrollContentPresenter;
src\Framework\System\Windows\Controls\ListBoxItem.cs (1)
339
if (
VisualTreeHelper
.GetParent(this) == null)
src\Framework\System\Windows\Controls\MenuItem.cs (2)
2189
DependencyObject newParent =
VisualTreeHelper
.GetParentInternal(this);
2379
owner =
VisualTreeHelper
.GetParent(this) as ItemsControl;
src\Framework\System\Windows\Controls\Page.cs (1)
661
Visual visualParent =
VisualTreeHelper
.GetParent(this) as Visual;
src\Framework\System\Windows\Controls\PopupControlService.cs (1)
986
return
VisualTreeHelper
.GetParent(v);
src\Framework\System\Windows\Controls\Primitives\BulletDecorator.cs (8)
393
if (
VisualTreeHelper
.GetChildrenCount(cp) == 1)
395
DependencyObject child =
VisualTreeHelper
.GetChild(cp, 0);
403
VisualTreeHelper
.GetChildrenCount(accessText) == 1)
406
textBlock =
VisualTreeHelper
.GetChild(accessText, 0) as TextBlock;
416
VisualTreeHelper
.GetChildrenCount(accessText) == 1)
419
return
VisualTreeHelper
.GetChild(accessText, 0) as TextBlock;
434
if(
VisualTreeHelper
.GetChildrenCount(cp) == 1)
435
return
VisualTreeHelper
.GetChild(cp, 0) as FlowDocumentScrollViewer;
src\Framework\System\Windows\Controls\Primitives\ButtonBase.cs (1)
93
return focusScope == null ||
VisualTreeHelper
.GetParent(focusScope) == null;
src\Framework\System\Windows\Controls\Primitives\DataGridColumnHeadersPresenter.cs (2)
145
UIElement child = (
VisualTreeHelper
.GetChildrenCount(this) > 0) ?
VisualTreeHelper
.GetChild(this, 0) as UIElement : null;
src\Framework\System\Windows\Controls\Primitives\DataGridDetailsPresenter.cs (2)
146
var childrenCount =
VisualTreeHelper
.GetChildrenCount(this);
149
return
VisualTreeHelper
.GetChild(this, 0) as FrameworkElement;
src\Framework\System\Windows\Controls\Primitives\DocumentPageView.cs (2)
934
visualParent =
VisualTreeHelper
.GetParent(this) as Visual;
942
visualParent =
VisualTreeHelper
.GetParent(visualParent) as Visual;
src\Framework\System\Windows\Controls\Primitives\DocumentViewerBase.cs (1)
1185
if (
VisualTreeHelper
.IsAncestorOf(this, targetObject))
src\Framework\System\Windows\Controls\Primitives\Popup.cs (11)
253
if (newValue == null &&
VisualTreeHelper
.GetParent(this) == null)
261
if (
VisualTreeHelper
.GetParent(this) == null)
317
if (!popup.IsLoaded &&
VisualTreeHelper
.GetParent(popup) != null)
725
parent =
VisualTreeHelper
.GetParent(parent);
909
if ((currentParent =
VisualTreeHelper
.GetParent(child)) != null)
982
if (logicalParent == null &&
VisualTreeHelper
.GetParent(element) != null)
1428
while ((parent =
VisualTreeHelper
.GetParent(root)) != null)
1442
targetVisual =
VisualTreeHelper
.GetContainingVisual2D(
VisualTreeHelper
.GetParent(this));
1817
DependencyObject parent =
VisualTreeHelper
.GetParent(this);
3399
dependencyObject =
VisualTreeHelper
.GetParent(dependencyObject);
src\Framework\System\Windows\Controls\Primitives\ScrollContentPresenter.cs (2)
764
int count =
VisualTreeHelper
.GetChildrenCount(itemsPresenter);
766
si =
VisualTreeHelper
.GetChild(itemsPresenter, 0) as IScrollInfo;
src\Framework\System\Windows\Controls\Primitives\Selector.cs (1)
1944
element = System.Windows.Media.
VisualTreeHelper
.GetParent(element) as FrameworkElement;
src\Framework\System\Windows\Controls\Primitives\TextBoxBase.cs (1)
1714
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
src\Framework\System\Windows\Controls\Primitives\ToolBarPanel.cs (2)
84
DependencyObject visualParent =
VisualTreeHelper
.GetParent(child);
440
DependencyObject visualParent =
VisualTreeHelper
.GetParent(child);
src\Framework\System\Windows\Controls\Stack.cs (2)
861
DependencyObject parent =
VisualTreeHelper
.GetParent(child);
866
parent =
VisualTreeHelper
.GetParent(dependencyObjectChild);
src\Framework\System\Windows\Controls\StickyNote.cs (1)
1003
FrameworkElement parent =
VisualTreeHelper
.GetParent(Content.InnerControl) as FrameworkElement;
src\Framework\System\Windows\Controls\TabControl.cs (1)
566
FrameworkElement visualParent =
VisualTreeHelper
.GetParent(tabItem) as FrameworkElement;
src\Framework\System\Windows\Controls\TextAdaptor.cs (5)
273
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
327
Visual visual =
VisualTreeHelper
.GetParent(textView.RenderScope) as Visual;
331
if (
VisualTreeHelper
.GetClip(visual) != null)
338
Rect rectBounds =
VisualTreeHelper
.GetClip(visual).Bounds;
348
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
src\Framework\System\Windows\Controls\ToolBar.cs (4)
660
Panel itemsHost =
VisualTreeHelper
.GetParent(currentFocusElement) as Panel;
667
newFocusElement =
VisualTreeHelper
.GetChild(itemsHost, 0) as UIElement;
670
newFocusElement =
VisualTreeHelper
.GetChild(itemsHost,
VisualTreeHelper
.GetChildrenCount(itemsHost)-1) as UIElement;
src\Framework\System\Windows\Controls\TreeView.cs (1)
836
return
VisualTreeHelper
.GetParent(v);
src\Framework\System\Windows\Controls\TreeViewItem.cs (5)
483
if (
VisualTreeHelper
.GetParent(this) != null)
838
FrameworkElement parent =
VisualTreeHelper
.GetParent(toggleButton) as FrameworkElement;
841
int count =
VisualTreeHelper
.GetChildrenCount(parent);
844
if (
VisualTreeHelper
.GetChild(parent, index) == toggleButton)
846
header =
VisualTreeHelper
.GetChild(parent, index+1) as FrameworkElement;
src\Framework\System\Windows\Controls\VirtualizingPanel.cs (1)
401
ItemsPresenter itemsPresenter =
VisualTreeHelper
.GetParent(p) as ItemsPresenter;
src\Framework\System\Windows\Controls\VirtualizingStackPanel.cs (15)
836
if (itemsControl == null || !
VisualTreeHelper
.IsAncestorOf(this, _scrollData._firstContainerInViewport))
1068
DependencyObject parent =
VisualTreeHelper
.GetParent(element);
3070
Panel parentPanel = (itemsOwner != null) ?
VisualTreeHelper
.GetParent(itemsOwner) as Panel : null;
3686
VirtualizingPanel vp =
VisualTreeHelper
.GetParent(itemsOwner) as VirtualizingPanel;
4023
VirtualizingPanel virtualizingPanel =
VisualTreeHelper
.GetParent(element) as VirtualizingPanel;
4105
parentItemsControl = ItemsControl.GetItemsOwnerInternal(
VisualTreeHelper
.GetParent(itemsControl)) as ItemsControl;
4123
ItemsControl.GetItemsOwnerInternal(
VisualTreeHelper
.GetParent(itemsOwner)) as IContainItemStorage;
6445
parent =
VisualTreeHelper
.GetParent(parent);
10892
DependencyObject element =
VisualTreeHelper
.GetParent(child);
10966
ItemsControl.GetItemsOwnerInternal(
VisualTreeHelper
.GetParent((Visual)itemStorageProvider)) as IContainItemStorage;
10983
element =
VisualTreeHelper
.GetParent(element);
10999
DependencyObject parent =
VisualTreeHelper
.GetParent(child);
11007
parent =
VisualTreeHelper
.GetParent(child);
12026
VirtualizingStackPanel parent =
VisualTreeHelper
.GetParent(itemsOwner) as VirtualizingStackPanel;
12886
VirtualizingStackPanel vsp =
VisualTreeHelper
.GetParent(container) as VirtualizingStackPanel;
src\Framework\System\Windows\DescendentsWalker.cs (3)
271
if (
VisualTreeHelper
.GetParent(fe) != fe.Parent)
328
if (
VisualTreeHelper
.GetParent(child) != ((FrameworkElement) child).Parent)
381
DependencyObject dependencyObjectParent =
VisualTreeHelper
.GetParent(fe);
src\Framework\System\Windows\DescendentsWalkerBase.cs (1)
42
DependencyObject dependencyObjectParent =
VisualTreeHelper
.GetParent(fe);
src\Framework\System\Windows\Documents\AdornerDecorator.cs (2)
130
if (
VisualTreeHelper
.GetParent(_adornerLayer) != null)
149
if (
VisualTreeHelper
.GetParent(_adornerLayer) != null)
src\Framework\System\Windows\Documents\AdornerLayer.cs (9)
295
PointHitTestResult result = VisualTreeUtils.AsNearestPointHitTestResult(
VisualTreeHelper
.HitTest(this, point, false));
308
visual = (Visual)
VisualTreeHelper
.GetParent(visual);
329
Visual parent =
VisualTreeHelper
.GetParent(visual) as Visual;
338
parent =
VisualTreeHelper
.GetParent(parent) as Visual;
721
Visual adornerLayerParent =
VisualTreeHelper
.GetParent(this) as Visual;
783
Visual adornerLayerParent =
VisualTreeHelper
.GetParent(this) as Visual;
843
Visual adornerLayerParent =
VisualTreeHelper
.GetParent(this) as Visual;
860
Geometry geometry =
VisualTreeHelper
.GetClip(element);
879
element = (Visual)
VisualTreeHelper
.GetParent(element);
src\Framework\System\windows\Documents\CaretElement.cs (1)
854
node =
VisualTreeHelper
.GetParent(node);
src\Framework\System\Windows\Documents\ColumnResizeAdorner.cs (1)
134
adornerLayer =
VisualTreeHelper
.GetParent(this) as AdornerLayer;
src\Framework\System\Windows\Documents\CompositionAdorner.cs (2)
132
Visual parent2d =
VisualTreeHelper
.GetParent(this.AdornedElement) as Visual;
353
AdornerLayer adornerLayer =
VisualTreeHelper
.GetParent(this) as AdornerLayer;
src\Framework\System\Windows\Documents\DocumentSequenceTextView.cs (1)
520
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
src\Framework\System\Windows\Documents\FixedTextView.cs (3)
702
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
791
HitTestResult result =
VisualTreeHelper
.HitTest(this.FixedPage, pt);
803
v =
VisualTreeHelper
.GetParent(v);
src\Framework\System\Windows\Documents\FlowDocument.cs (1)
919
parentOfEmbeddedElement =
VisualTreeHelper
.GetParent((Visual)element);
src\Framework\System\Windows\Documents\RubberbandSelector.cs (8)
333
visual.Clip =
VisualTreeHelper
.GetClip(old);
334
visual.Offset =
VisualTreeHelper
.GetOffset(old);
335
visual.Transform =
VisualTreeHelper
.GetTransform(old);
336
visual.Opacity =
VisualTreeHelper
.GetOpacity(old);
337
visual.OpacityMask =
VisualTreeHelper
.GetOpacityMask(old);
340
visual.BitmapEffectInput =
VisualTreeHelper
.GetBitmapEffectInput(old);
341
visual.BitmapEffect =
VisualTreeHelper
.GetBitmapEffect(old);
350
int count =
VisualTreeHelper
.GetChildrenCount(old);
src\Framework\System\windows\Documents\TextEditorContextMenu.cs (2)
300
for (Visual visual = This.UiScope; visual != null; visual =
VisualTreeHelper
.GetParent(visual) as Visual)
363
Geometry clip =
VisualTreeHelper
.GetClip(element);
src\Framework\System\windows\Documents\TextEditorMouse.cs (4)
622
Visual scrollViewer =
VisualTreeHelper
.GetParent(This.UiScope) as Visual;
625
scrollViewer =
VisualTreeHelper
.GetParent(scrollViewer) as Visual;
779
HitTestResult hitTestResult =
VisualTreeHelper
.HitTest(textEditor.UiScope, point);
811
hitElement =
VisualTreeHelper
.GetParent(hitElement);
src\Framework\System\windows\Documents\TextSelection.cs (3)
2476
element =
VisualTreeHelper
.GetParent(element);
2599
parent =
VisualTreeHelper
.GetParent(element);
2605
parent =
VisualTreeHelper
.GetParent(element);
src\Framework\System\Windows\FrameworkElement.cs (12)
2224
for (Visual v =
VisualTreeHelper
.GetParent(this) as Visual;
2226
v =
VisualTreeHelper
.GetParent(v) as Visual)
2466
DependencyObject newParent =
VisualTreeHelper
.GetParentInternal(this);
2546
FrameworkElement.GetContainingFrameworkElement(
VisualTreeHelper
.GetParent(this), out feParent, out fceParent);
2555
if(feParent == null || !
VisualTreeHelper
.IsAncestorOf(e.Ancestor, feParent))
2558
BroadcastEventHelper.AddOrRemoveHasLoadedChangeHandlerFlag(this, null,
VisualTreeHelper
.GetParent(e.Ancestor));
2561
BroadcastEventHelper.BroadcastLoadedOrUnloadedEvent(this, null,
VisualTreeHelper
.GetParent(e.Ancestor));
2900
DependencyObject visualParent =
VisualTreeHelper
.GetParent(this);
3116
DependencyObject visualParent =
VisualTreeHelper
.GetParent(this);
3979
DependencyObject parentVisual =
VisualTreeHelper
.GetParent(fe);
4015
for (DependencyObject v = visual; v != null; v =
VisualTreeHelper
.GetParent(v))
5544
fe._parent == null &&
VisualTreeHelper
.GetParent(fe) == null &&
src\Framework\System\Windows\Generated\FrameworkElement.cs (2)
723
parent =
VisualTreeHelper
.GetParent(this);
757
parent =
VisualTreeHelper
.GetParent(this);
src\Framework\System\Windows\Input\KeyboardNavigation.cs (14)
728
if (_adornedContentElement != null && (_contentHostParent==null ||
VisualTreeHelper
.GetParent(_contentHostParent as Visual) == null))
840
visualParent =
VisualTreeHelper
.GetParent(visualParent) as Visual;
860
AdornerLayer adornerlayer =
VisualTreeHelper
.GetParent(_focusVisualAdornerCache) as AdornerLayer;
1584
int count =
VisualTreeHelper
.GetChildrenCount(parentAsUIElement);
1588
DependencyObject vchild =
VisualTreeHelper
.GetChild(parentAsUIElement, i);
1645
int count =
VisualTreeHelper
.GetChildrenCount(parentAsUIElement);
1650
DependencyObject vchild =
VisualTreeHelper
.GetChild(parentAsUIElement, i);
1657
DependencyObject visual =
VisualTreeHelper
.GetChild(parentAsUIElement, i);
1758
int count =
VisualTreeHelper
.GetChildrenCount(elementAsVisual);
1761
DependencyObject visual =
VisualTreeHelper
.GetChild(elementAsVisual, i);
1823
int count =
VisualTreeHelper
.GetChildrenCount(elementAsVisual);
1826
DependencyObject visual =
VisualTreeHelper
.GetChild(elementAsVisual, i);
1849
while ((visual =
VisualTreeHelper
.GetParent(visual)) != null)
2531
Visual containingVisual2D =
VisualTreeHelper
.GetContainingVisual2D(uiElement3D);
src\Framework\System\Windows\Shell\WindowChromeWorker.cs (3)
390
if (
VisualTreeHelper
.GetChildrenCount(_window) == 0)
401
var rootElement = (FrameworkElement)
VisualTreeHelper
.GetChild(_window, 0);
1533
var rootElement = (FrameworkElement)
VisualTreeHelper
.GetChild(_window, 0);
src\Framework\System\Windows\StyleHelper.cs (2)
1968
FrameworkElement parent =
VisualTreeHelper
.GetParent(child) as FrameworkElement;
1977
Debug.Assert( null ==
VisualTreeHelper
.GetParent(child),
src\Framework\System\Windows\TreeWalkHelper.cs (1)
1014
DependencyObject visualParent =
VisualTreeHelper
.GetParent(d);
src\Framework\System\Windows\Window.cs (1)
1845
if (
VisualTreeHelper
.GetParent(this) != null )
System.Activities.Core.Presentation (11)
System\Activities\Core\Presentation\FlowchartConnectionPointsAdorner.cs (2)
66
double pixelsPerDip =
VisualTreeHelper
.GetDpi(trueConnectionPoint).PixelsPerDip;
98
double pixelsPerDip =
VisualTreeHelper
.GetDpi(falseConnectionPoint).PixelsPerDip;
System\Activities\Core\Presentation\FlowchartDesigner.Helpers.cs (2)
28
HitTestResult result =
VisualTreeHelper
.HitTest(reference, point);
39
obj =
VisualTreeHelper
.GetParent(obj);
System\Activities\Core\Presentation\FlowchartDesigner.xaml.cs (2)
768
HitTestResult hitTestResult =
VisualTreeHelper
.HitTest(this.panel, newPoint);
2586
else if (
VisualTreeHelper
.GetParent(view) == null)
System\Activities\Core\Presentation\StateContainerEditor.Utilities.cs (2)
105
HitTestResult result =
VisualTreeHelper
.HitTest(reference, point);
116
obj =
VisualTreeHelper
.GetParent(obj);
System\Activities\Core\Presentation\StateContainerEditor.xaml.cs (1)
1546
HitTestResult hitTestResult =
VisualTreeHelper
.HitTest(this.panel, newPoint);
System\Activities\Core\Presentation\TransitionDesigner.xaml.cs (2)
538
HitTestResult result =
VisualTreeHelper
.HitTest(visualToHitTest, point);
546
obj =
VisualTreeHelper
.GetParent(obj))
System.Activities.Presentation (53)
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Editors\FlagEditor.xaml.cs (4)
105
if (comboBoxItem != null &&
VisualTreeHelper
.GetChildrenCount(comboBoxItem) > 0)
108
StackPanel panel =
VisualTreeHelper
.GetChild(comboBoxItem, 0) as StackPanel;
109
if (panel != null &&
VisualTreeHelper
.GetChildrenCount(panel) > 0)
112
UIElement item =
VisualTreeHelper
.GetChild(panel, 0) as UIElement;
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Editors\quickitemtemplateselector.cs (1)
53
element =
VisualTreeHelper
.GetParent(element);
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\FromExpression\Framework\Controls\WorkaroundPopup.cs (1)
110
currentObject =
VisualTreeHelper
.GetParent(currentObject);
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Selection\PropertySelection.cs (4)
472
element =
VisualTreeHelper
.GetParent(element);
502
neighbor = FindChildSelectionStop<T>(element, 0,
VisualTreeHelper
.GetChildrenCount(element) - 1, direction, maxSearchDepth, MatchDirection.Down);
632
DependencyObject child =
VisualTreeHelper
.GetChild(parent, index);
650
int grandChildrenCount =
VisualTreeHelper
.GetChildrenCount(child);
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\VisualTreeUtils.cs (16)
64
int childCount =
VisualTreeHelper
.GetChildrenCount(container);
73
FrameworkElement child =
VisualTreeHelper
.GetChild(container, index) as FrameworkElement;
106
int childrenCount =
VisualTreeHelper
.GetChildrenCount(element);
115
element =
VisualTreeHelper
.GetChild(element, 0);
144
child =
VisualTreeHelper
.GetParent(child);
165
int childCount =
VisualTreeHelper
.GetChildrenCount(reference);
168
T child =
VisualTreeHelper
.GetChild(reference, i) as T;
205
UIElement parent =
VisualTreeHelper
.GetParent(reference) as UIElement;
213
parent =
VisualTreeHelper
.GetParent(parent) as UIElement;
230
DependencyObject parent =
VisualTreeHelper
.GetParent(child);
234
childrenCount =
VisualTreeHelper
.GetChildrenCount(parent);
237
if (child.Equals(
VisualTreeHelper
.GetChild(parent, childIndex)))
266
parent =
VisualTreeHelper
.GetParent(parent) as UIElement;
314
totalChildCount =
VisualTreeHelper
.GetChildrenCount(currentObject.Visual);
317
child =
VisualTreeHelper
.GetChild(currentObject.Visual, i) as Visual;
337
element =
VisualTreeHelper
.GetParent(element);
System.Activities.Presentation\System\Activities\Presentation\CutCopyPasteHelper.cs (3)
131
obj =
VisualTreeHelper
.GetParent(obj);
462
HitTestResult hitTest =
VisualTreeHelper
.HitTest(parentVisual, clickPoint);
469
visualHit =
VisualTreeHelper
.GetParent(visualHit);
System.Activities.Presentation\System\Activities\Presentation\DragDropHelper.cs (2)
828
Rect bounds =
VisualTreeHelper
.GetDescendantBounds(viewElement);
852
Rect bounds =
VisualTreeHelper
.GetDescendantBounds(viewElement);
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\AutoConnectHelper.cs (1)
37
if (target != null &&
VisualTreeHelper
.GetParent(target) == null)
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectorWithStartDot.xaml.cs (1)
56
HitTestResult result =
VisualTreeHelper
.HitTest(this, e.GetPosition(this));
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\FreeFormPanel.cs (1)
280
obj =
VisualTreeHelper
.GetParent(obj);
System.Activities.Presentation\System\Activities\Presentation\MiniMap\MiniMapControl.xaml.cs (1)
358
VisualTreeHelper
.HitTest(this.lookupCanvas, args.GetPosition(this.lookupCanvas));
System.Activities.Presentation\System\Activities\Presentation\View\ActivityTypeResolver.xaml.cs (2)
253
for (int i = 0; i <
VisualTreeHelper
.GetChildrenCount(tree); i++)
255
DependencyObject child =
VisualTreeHelper
.GetChild(tree, i);
System.Activities.Presentation\System\Activities\Presentation\View\AutoScrollHelper.cs (1)
22
element =
VisualTreeHelper
.GetParent(element);
System.Activities.Presentation\System\Activities\Presentation\View\DataGridHelper.cs (2)
1060
int numVisuals =
VisualTreeHelper
.GetChildrenCount(parent);
1063
Visual v = (Visual)
VisualTreeHelper
.GetChild(parent, i);
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.xaml.cs (2)
644
source =
VisualTreeHelper
.GetParent(source) as FrameworkElement;
1165
Rect bounds =
VisualTreeHelper
.GetDescendantBounds(this.designerPresenter);
System.Activities.Presentation\System\Activities\Presentation\View\RubberBandSelector.cs (2)
193
HitTestResult result =
VisualTreeHelper
.HitTest(this.Designer.scrollableContent, e.GetPosition(this.Designer.scrollableContent));
216
HitTestResult result =
VisualTreeHelper
.HitTest(this.Designer.scrollViewer, e.GetPosition(this.Designer.scrollViewer));
System.Activities.Presentation\System\Activities\Presentation\View\ViewUtilities.cs (1)
267
current != null; current =
VisualTreeHelper
.GetParent(current))
System.Activities.Presentation\System\Activities\Presentation\View\VirtualizedContainerService.cs (2)
367
DependencyObject parent =
VisualTreeHelper
.GetParent(this);
370
parent =
VisualTreeHelper
.GetParent(parent);
System.Activities.Presentation\System\Activities\Presentation\WorkflowItemPresenter.cs (4)
283
DependencyObject parent =
VisualTreeHelper
.GetParent(this);
286
parent =
VisualTreeHelper
.GetParent(parent);
410
parent =
VisualTreeHelper
.GetParent(this) as FrameworkElement;
413
parent =
VisualTreeHelper
.GetParent(parent) as FrameworkElement;
System.Activities.Presentation\System\Activities\Presentation\WorkflowItemsPresenter.cs (2)
325
DependencyObject parent =
VisualTreeHelper
.GetParent(this);
328
parent =
VisualTreeHelper
.GetParent(parent);