439 references to VisualTreeHelper
Microsoft.VisualStudio.LanguageServices (3)
DocumentOutline\DocumentOutlineView.xaml.cs (2)
328
var container =
VisualTreeHelper
.GetChild(item, 0);
329
var border =
VisualTreeHelper
.GetChild(container, 1);
Utilities\DependencyObjectExtensions.cs (1)
16
return (obj is Visual) ?
VisualTreeHelper
.GetParent(obj) : null;
PresentationCore (99)
MS\Internal\Automation\ElementUtil.cs (5)
61
return
VisualTreeHelper
.GetParent(el) as Visual;
89
Visual parent =
VisualTreeHelper
.GetParent(el) as Visual;
103
Visual parent =
VisualTreeHelper
.GetParent(el) as Visual;
119
Visual test =
VisualTreeHelper
.GetParent(scan) as Visual;
173
PointHitTestResult result = VisualTreeUtils.AsNearestPointHitTestResult(
VisualTreeHelper
.HitTest(root, pointRoot));
MS\Internal\DeferredElementTreeState.cs (2)
36
parent =
VisualTreeHelper
.GetParent(v);
50
parent =
VisualTreeHelper
.GetParent(v3D);
MS\Internal\Ink\Renderer.cs (5)
369
=
VisualTreeHelper
.GetParent(visual) as ContainerVisual;
586
&& (
VisualTreeHelper
.GetParent(precedingVisual) != null))
588
VisualCollection children = ((ContainerVisual)(
VisualTreeHelper
.GetParent(precedingVisual))).Children;
610
ContainerVisual parent = (ContainerVisual)(
VisualTreeHelper
.GetParent(visual));
675
else if (
VisualTreeHelper
.GetParent(hcVisual) == null)
MS\Internal\Media3D\GeneralTransform2DTo3DTo2D.cs (1)
126
Viewport3DVisual viewport3D = (Viewport3DVisual)
VisualTreeHelper
.GetContainingVisual2D(visual3D);
MS\Internal\Media3D\M3DUtil.cs (1)
543
dependencyObject =
VisualTreeHelper
.GetParent(dependencyObject);
MS\Internal\UIElementHelper.cs (1)
81
reference =
VisualTreeHelper
.GetParent(reference);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\PointUtil.cs (2)
147
Transform transform =
VisualTreeHelper
.GetTransform(v);
154
Vector offset =
VisualTreeHelper
.GetOffset(v);
System\Windows\Automation\Peers\UIElement3DAutomationPeer.cs (4)
95
int count =
VisualTreeHelper
.GetChildrenCount(parent);
98
DependencyObject child =
VisualTreeHelper
.GetChild(parent, i);
198
Rect rectRoot = PointUtil.ElementToRoot(rectElement,
VisualTreeHelper
.GetContainingVisual2D(_owner), presentationSource);
256
reference =
VisualTreeHelper
.GetParent(reference);
System\Windows\Automation\Peers\UIElementAutomationPeer.cs (5)
114
int count =
VisualTreeHelper
.GetChildrenCount(parent);
117
DependencyObject child =
VisualTreeHelper
.GetChild(parent, i);
274
DependencyObject parent =
VisualTreeHelper
.GetParent(owner);
284
Geometry clipGeometry =
VisualTreeHelper
.GetClip(visualParent);
304
parent =
VisualTreeHelper
.GetParent(parent);
System\Windows\Diagnostics\VisualDiagnostics.cs (3)
132
isPotentialOuterChange: (changeType==VisualTreeChangeType.Add && index==0 &&
VisualTreeHelper
.GetParent(parent) == null));
182
int count =
VisualTreeHelper
.GetChildrenCount(parent);
185
DependencyObject obj =
VisualTreeHelper
.GetChild(parent, i);
System\Windows\Documents\DocumentPage.cs (1)
105
return
VisualTreeHelper
.GetContentBounds(_visual).Size;
System\Windows\Input\FocusManager.cs (2)
334
dependencyObject =
VisualTreeHelper
.GetParent(dependencyObject);
387
DependencyObject visualParent =
VisualTreeHelper
.GetParent(d);
System\Windows\Input\InputElement.cs (7)
65
DependencyObject parent =
VisualTreeHelper
.GetParent(v);
73
DependencyObject parent =
VisualTreeHelper
.GetParent(v3D);
113
DependencyObject parent =
VisualTreeHelper
.GetParent(v);
121
DependencyObject parent =
VisualTreeHelper
.GetParent(v3D);
195
while(rootVisual != null && ((parentVisual =
VisualTreeHelper
.GetParent(rootVisual)) != null))
234
vFrom =
VisualTreeHelper
.GetContainingVisual2D(vFromAsDO);
309
vToAsVisual =
VisualTreeHelper
.GetContainingVisual2D(vTo);
System\Windows\Input\Manipulation.cs (1)
310
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
System\Windows\Input\Stylus\Common\StylusDevice.cs (2)
353
Visual visualFirstAncestor =
VisualTreeHelper
.GetContainingVisual2D(InputElement.GetContainingVisual(doRelativeTo));
354
Visual visualRoot =
VisualTreeHelper
.GetContainingVisual2D(InputElement.GetRootVisual(doRelativeTo));
System\Windows\Input\Stylus\Common\StylusPlugInCollection.cs (1)
269
Visual root =
VisualTreeHelper
.GetContainingVisual2D(InputElement.GetRootVisual(_element));
System\Windows\Input\Stylus\Common\StylusTouchDeviceBase.cs (1)
129
Visual containingVisual2D =
VisualTreeHelper
.GetContainingVisual2D(containingVisual);
System\Windows\Input\Stylus\Pointer\PointerInteractionEngine.cs (1)
495
DpiScale dpi =
VisualTreeHelper
.GetDpi(_stylusDevice.CriticalActiveSource.RootVisual);
System\Windows\Input\Stylus\Pointer\PointerStylusPlugInManager.cs (9)
96
if (
VisualTreeHelper
.IsAncestorOf(spicAddingVisual, curV))
102
if (!
VisualTreeHelper
.IsAncestorOf(spicAddingVisual, curV))
111
DependencyObject commonParent =
VisualTreeHelper
.FindCommonAncestor(spicAddingVisual, curV);
123
while (
VisualTreeHelper
.GetParentInternal(spicAddingVisual) != commonParent)
124
spicAddingVisual =
VisualTreeHelper
.GetParentInternal(spicAddingVisual);
125
while (
VisualTreeHelper
.GetParentInternal(curV) != commonParent)
126
curV =
VisualTreeHelper
.GetParentInternal(curV);
128
int count =
VisualTreeHelper
.GetChildrenCount(commonParent);
131
DependencyObject child =
VisualTreeHelper
.GetChild(commonParent, j);
System\Windows\Input\Stylus\Pointer\PointerTouchDevice.cs (1)
84
pixelsPerInch =
VisualTreeHelper
.GetDpi(ActiveSource.RootVisual).PixelsPerInchX;
System\Windows\Input\Stylus\Wisp\PenContexts.cs (9)
304
if (
VisualTreeHelper
.IsAncestorOf(spicAddingVisual, curV))
310
if (!
VisualTreeHelper
.IsAncestorOf(spicAddingVisual, curV))
319
DependencyObject commonParent =
VisualTreeHelper
.FindCommonAncestor(spicAddingVisual, curV);
331
while (
VisualTreeHelper
.GetParentInternal(spicAddingVisual) != commonParent)
332
spicAddingVisual =
VisualTreeHelper
.GetParentInternal(spicAddingVisual);
333
while (
VisualTreeHelper
.GetParentInternal(curV) != commonParent)
334
curV =
VisualTreeHelper
.GetParentInternal(curV);
336
int count =
VisualTreeHelper
.GetChildrenCount(commonParent);
339
DependencyObject child =
VisualTreeHelper
.GetChild(commonParent, j);
System\Windows\Input\TouchDevice.cs (1)
1215
currentChild =
VisualTreeHelper
.GetParent(currentChild);
System\Windows\InterOp\HwndMouseInputProvider.cs (1)
299
GeneralTransform gDown = inputSource.RootVisual.TransformToDescendant(
VisualTreeHelper
.GetContainingVisual2D(containingVisual));
System\Windows\InterOp\HwndTarget.cs (2)
1820
int childrenCount =
VisualTreeHelper
.GetChildrenCount(d);
1823
DependencyObject child =
VisualTreeHelper
.GetChild(d, i);
System\Windows\Media\BitmapCacheBrush.cs (4)
216
((
VisualTreeHelper
.GetParent(element) == null && !(element.IsRootElement)) // element is not connected to visual tree, OR
217
|| (
VisualTreeHelper
.GetParent(element) is Visual3D) // element is a 2D child of a 3D object, OR
218
|| (
VisualTreeHelper
.GetParent(element) == InternalTarget))) // element is only connected to visual tree via our wrapper Visual
271
DependencyObject parent =
VisualTreeHelper
.GetParent(element);
System\Windows\Media\Visual.cs (6)
1915
VisualTreeHelper
.HitTest(
4507
while ((
VisualTreeHelper
.GetParent(g) != null) && (g != ancestor))
4586
g =
VisualTreeHelper
.GetContainingVisual2D(gAsVisual3D);
4683
Viewport2DVisual3D containingVisual3D =
VisualTreeHelper
.GetContainingVisual3D(this) as Viewport2DVisual3D;
5113
e =
VisualTreeHelper
.GetParent(e);
5182
e =
VisualTreeHelper
.GetParent(e);
System\Windows\Media\VisualBrush.cs (3)
199
((
VisualTreeHelper
.GetParent(element) == null && !(element.IsRootElement))
200
|| (
VisualTreeHelper
.GetParent(element) is Visual3D)))
239
DependencyObject parent =
VisualTreeHelper
.GetParent(element);
System\Windows\Media\VisualCollection.cs (1)
433
Visual oldParent =
VisualTreeHelper
.GetContainingVisual2D(child._parent);
System\Windows\Media\VisualTreeHelper.cs (2)
187
reference =
VisualTreeHelper
.GetParent(reference);
206
reference =
VisualTreeHelper
.GetParent(reference);
System\Windows\Media3D\Visual3D.cs (6)
466
Debug.Assert(
VisualTreeHelper
.GetParent(this) != null, "If oldParent is null, current parent should != null.");
471
VisualTreeHelper
.GetParent(this),
812
Viewport3DVisual viewport3DVisual = (Viewport3DVisual)
VisualTreeHelper
.GetContainingVisual2D(this);
1681
while ((
VisualTreeHelper
.GetParent(g) != null) && (g != ancestor))
1693
g =
VisualTreeHelper
.GetParent(gAsVisual3D);
1710
Visual3D containing3DParent =
VisualTreeHelper
.GetContainingVisual3D(gAsVisual);
System\Windows\Navigation\BaseUriHelper.cs (1)
599
doCurrent =
VisualTreeHelper
.GetParent(vis);
System\Windows\UIElement.cs (7)
727
for(Visual v =
VisualTreeHelper
.GetParent(this) as Visual; v != null; v =
VisualTreeHelper
.GetParent(v) as Visual)
745
for(Visual v =
VisualTreeHelper
.GetParent(this) as Visual; v != null; v =
VisualTreeHelper
.GetParent(v) as Visual)
1552
if(parent != null &&
VisualTreeHelper
.IsAncestorOf(e.Ancestor, parent))
2046
VisualTreeHelper
.HitTest(this,
2119
candidate =
VisualTreeHelper
.GetParentInternal(candidate);
System\Windows\UIElement3D.cs (1)
254
if (parent != null &&
VisualTreeHelper
.IsAncestorOf(e.Ancestor, parent))
PresentationFramework (287)
MS\Internal\Annotations\Anchoring\PathNode.cs (1)
245
parent =
VisualTreeHelper
.GetParent(visual);
MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (2)
208
int count =
VisualTreeHelper
.GetChildrenCount(dpv);
210
return
VisualTreeHelper
.GetChild(dpv, 0) as DocumentPageHost;
MS\Internal\Annotations\Component\AdornerPresentationContext.cs (5)
147
Visual parent =
VisualTreeHelper
.GetParent(_adornerLayer) as Visual;
398
int count =
VisualTreeHelper
.GetChildrenCount(_adornerLayer);
404
DependencyObject child =
VisualTreeHelper
.GetChild(_adornerLayer, i);
457
int count =
VisualTreeHelper
.GetChildrenCount(adornerLayer);
463
DependencyObject child =
VisualTreeHelper
.GetChild(adornerLayer, i);
MS\Internal\Annotations\Component\AnnotationAdorner.cs (1)
178
AdornerLayer adornerLayer = (AdornerLayer)
VisualTreeHelper
.GetParent(this);
MS\Internal\Controls\InkCanvasFeedbackAdorner.cs (2)
118
UIElement parent = ((UIElement)
VisualTreeHelper
.GetParent(this)) as UIElement;
122
((UIElement)
VisualTreeHelper
.GetParent(this)).InvalidateArrange();
MS\Internal\Controls\InkCanvasInnerCanvas.cs (2)
256
HitTestResult hitTestResult =
VisualTreeHelper
.HitTest(this, point);
276
DependencyObject parent =
VisualTreeHelper
.GetParent(currentObject);
MS\Internal\Data\CommitManager.cs (1)
139
bool result = (ancestor == null) ||
VisualTreeHelper
.IsAncestorOf(ancestor, element);
MS\Internal\Data\ObjectRef.cs (3)
267
ContentPresenter cp =
VisualTreeHelper
.IsVisualType(dd) ?
VisualTreeHelper
.GetParent(dd) as ContentPresenter : null;
518
DependencyObject layout = (v != null) ?
VisualTreeHelper
.GetParent(v) : null;
MS\Internal\Documents\ContentHostHelper.cs (2)
101
if (
VisualTreeHelper
.GetChildrenCount(textView.RenderScope) > 0)
103
ich =
VisualTreeHelper
.GetChild(textView.RenderScope, 0) as IContentHost;
MS\Internal\Documents\DocumentGrid.cs (3)
1318
if (
VisualTreeHelper
.GetParent(this) != null)
2651
HitTestResult result =
VisualTreeHelper
.HitTest(this, point);
2665
currentVisual =
VisualTreeHelper
.GetParent(currentVisual);
MS\Internal\Documents\DocumentPageHost.cs (4)
52
Visual currentParent =
VisualTreeHelper
.GetParent(pageVisual) as Visual;
58
DocumentPageHost docPageHost =
VisualTreeHelper
.GetParent(pageVisualHost) as DocumentPageHost;
89
pageVisualHost =
VisualTreeHelper
.GetParent(_pageVisual) as ContainerVisual;
128
return
VisualTreeHelper
.GetParent(_pageVisual) as Visual;
MS\Internal\Documents\DocumentViewerHelper.cs (6)
344
VisualTreeHelper
.IsAncestorOf(findToolBarHost, focusedElement))
352
VisualTreeHelper
.IsAncestorOf(findToolBarHost, focusedElement))
456
Visual visual =
VisualTreeHelper
.GetParent(originalVisual) as Visual;
459
if (
VisualTreeHelper
.GetClip(visual) != null)
466
Rect rectBounds =
VisualTreeHelper
.GetClip(visual).Bounds;
476
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
MS\Internal\Documents\TextDocumentView.cs (1)
560
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
MS\Internal\Documents\UIElementIsland.cs (1)
41
Visual currentParent =
VisualTreeHelper
.GetParent(_child) as Visual;
MS\Internal\FrameworkObject.cs (7)
314
fo.Reset(
VisualTreeHelper
.GetParent(visual));
322
fo.Reset(
VisualTreeHelper
.GetParent(visual3D));
407
parent =
VisualTreeHelper
.GetParent(_fe);
421
parent =
VisualTreeHelper
.GetParent(visual);
429
parent =
VisualTreeHelper
.GetParent(visual3D);
868
visualParent =
VisualTreeHelper
.GetParent(_fe);
877
visualParent = (visual != null) ?
VisualTreeHelper
.GetParent(visual) : null;
MS\Internal\Helper.cs (13)
456
parent =
VisualTreeHelper
.GetParent(v);
529
UIElement child = (
VisualTreeHelper
.GetChildrenCount(element) > 0) ?
VisualTreeHelper
.GetChild(element, 0) as UIElement : null;
546
UIElement child = (
VisualTreeHelper
.GetChildrenCount(element) > 0) ?
VisualTreeHelper
.GetChild(element, 0) as UIElement : null;
1282
int count =
VisualTreeHelper
.GetChildrenCount(searchStart);
1285
descendant =
VisualTreeHelper
.GetChild(searchStart, i) as FrameworkElement;
1310
element =
VisualTreeHelper
.GetParent(element);
1342
Debug.Assert(
VisualTreeHelper
.IsAncestorOf(pathEndElement, pathStartElement), "pathEndElement should be an ancestor of pathStartElement");
1379
element =
VisualTreeHelper
.GetParent(element);
1402
int childrenCount =
VisualTreeHelper
.GetChildrenCount(d);
1405
DependencyObject child =
VisualTreeHelper
.GetChild(d, i);
1456
parent =
VisualTreeHelper
.GetParent(element);
MS\Internal\Ink\InkCanvasSelection.cs (3)
153
Debug.Assert(
VisualTreeHelper
.GetParent(feedbackAdorner) == null,
168
Debug.Assert(
VisualTreeHelper
.GetParent(_inkCanvas.FeedbackAdorner)
186
Debug.Assert(
VisualTreeHelper
.GetParent(feedbackAdorner) == adornerLayer,
MS\Internal\LayoutDump.cs (6)
218
Geometry clip =
VisualTreeHelper
.GetClip(visual);
250
Geometry clip =
VisualTreeHelper
.GetClip(element);
337
int count =
VisualTreeHelper
.GetChildrenCount(visualParent);
422
int count =
VisualTreeHelper
.GetChildrenCount(visual);
837
int count1 =
VisualTreeHelper
.GetChildrenCount(visual);
841
int count2 =
VisualTreeHelper
.GetChildrenCount(rowVisual);
MS\Internal\PtsHost\Line.cs (1)
425
Visual currentParent =
VisualTreeHelper
.GetParent(inlineObject.UIElementIsland) as Visual;
MS\Internal\PtsHost\PtsHelper.cs (1)
273
Visual currentParent =
VisualTreeHelper
.GetParent(paraClient.Visual) as Visual;
MS\Internal\PtsHost\TableParaClient.cs (4)
1579
||
VisualTreeHelper
.GetParent(cellParaClient.Visual) == null )
1581
Visual currentParent =
VisualTreeHelper
.GetParent(cellParaClient.Visual) as Visual;
1595
&&
VisualTreeHelper
.GetParent(cellParaClient.Visual) != null );
1724
&&
VisualTreeHelper
.GetParent(cellParaClient.Visual) != null );
MS\Internal\PtsHost\TextParaClient.cs (7)
2273
int count =
VisualTreeHelper
.GetChildrenCount(Visual);
2286
visual =
VisualTreeHelper
.GetChild(Visual, visualIndex) as LineVisual;
2288
Invariant.Assert(visual != null ||
VisualTreeHelper
.GetChild(Visual, visualIndex) == null);
2303
int count =
VisualTreeHelper
.GetChildrenCount(Visual);
2309
if(
VisualTreeHelper
.GetChild(Visual, visualIndex) is ParagraphElementVisual)
2315
visual =
VisualTreeHelper
.GetChild(temp, visualIndex) as LineVisual;
2317
Invariant.Assert(visual != null ||
VisualTreeHelper
.GetChild(temp, visualIndex) == null);
MS\Internal\PtsHost\UIElementParaClient.cs (1)
118
Visual currentParent =
VisualTreeHelper
.GetParent(uiElementIsland) as Visual;
MS\Internal\Text\ComplexLine.cs (1)
172
Visual currentParent =
VisualTreeHelper
.GetParent(inlineObject.Element) as Visual;
System\Windows\Annotations\AnnotationDocumentPaginator.cs (2)
397
Invariant.Assert(
VisualTreeHelper
.GetChildrenCount(dpv) == 1, "DocumentPageView has no visual children.");
398
DependencyObject firstElement =
VisualTreeHelper
.GetChild(dpv, 0);
System\Windows\Automation\Peers\DocumentAutomationPeer.cs (3)
249
if (
VisualTreeHelper
.GetClip(visual) != null)
256
Rect clipBounds =
VisualTreeHelper
.GetClip(visual).Bounds;
266
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
System\Windows\Automation\Peers\TextElementAutomationPeer.cs (3)
180
if (
VisualTreeHelper
.GetClip(visual) != null)
188
Rect rectBounds =
VisualTreeHelper
.GetClip(visual).Bounds;
200
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
System\Windows\Automation\Peers\TreeViewItemAutomationPeer.cs (2)
95
int count =
VisualTreeHelper
.GetChildrenCount(parent);
98
DependencyObject child =
VisualTreeHelper
.GetChild(parent, i);
System\Windows\BroadcastEventHelper.cs (6)
487
visual =
VisualTreeHelper
.GetContainingVisual2D(visual3D);
589
int count =
VisualTreeHelper
.GetChildrenCount(v);
593
FrameworkElement child =
VisualTreeHelper
.GetChild(v, i) as FrameworkElement;
638
DependencyObject coreParent = (fo.IsFE) ?
VisualTreeHelper
.GetParent(fo.FE) : null;
702
coreParent =
VisualTreeHelper
.GetParent(v);
710
coreParent =
VisualTreeHelper
.GetParent(v3D);
System\Windows\Controls\AdornedElementPlaceholder.cs (1)
232
_templatedAdorner =
VisualTreeHelper
.GetParent(templateParent) as TemplatedAdorner;
System\Windows\Controls\Canvas.cs (1)
199
Canvas p =
VisualTreeHelper
.GetParent(uie) as Canvas;
System\Windows\Controls\ComboBox.cs (4)
240
if (comboBox._clonedElement != null &&
VisualTreeHelper
.GetParent(comboBox._clonedElement) == null)
932
DependencyObject parent =
VisualTreeHelper
.GetParent(_clonedElement);
1616
int count =
VisualTreeHelper
.GetChildrenCount(visual);
1619
strValue += ExtractString((DependencyObject)(
VisualTreeHelper
.GetChild(visual, i)));
System\Windows\Controls\DataGrid.cs (3)
6389
sourceElement =
VisualTreeHelper
.GetParent(sourceElement) as UIElement;
6621
element =
VisualTreeHelper
.GetParent(row) as UIElement;
6642
element =
VisualTreeHelper
.GetParent(cell) as UIElement;
System\Windows\Controls\DataGridCellsPanel.cs (4)
87
UIElement parent =
VisualTreeHelper
.GetParent(this) as UIElement;
715
if (isRecycled &&
VisualTreeHelper
.GetParent(container) != null)
737
if (isRecycled &&
VisualTreeHelper
.GetParent(container) != null)
1861
return
VisualTreeHelper
.GetParent(row) as DataGridRowsPresenter;
System\Windows\Controls\DataGridColumnFloatingHeader.cs (1)
148
Vector offset =
VisualTreeHelper
.GetOffset(_referenceHeader);
System\Windows\Controls\DataGridHelper.cs (6)
185
parent =
VisualTreeHelper
.GetParent(parent) as UIElement;
219
int childCount =
VisualTreeHelper
.GetChildrenCount(element);
222
DependencyObject child =
VisualTreeHelper
.GetChild(element, i) as DependencyObject;
310
return
VisualTreeHelper
.GetParent(element) as DataGridCellsPanel;
574
return
VisualTreeHelper
.IsAncestorOf(element, contextElement, typeof(T));
667
VisualTreeHelper
.IsAncestorOf(cell, targetElement, typeof(DataGridCell)))
System\Windows\Controls\DockPanel.cs (1)
130
DockPanel p =
VisualTreeHelper
.GetParent(uie) as DockPanel;
System\Windows\Controls\FlowDocumentScrollViewer.cs (2)
1297
if (RenderScope != null &&
VisualTreeHelper
.GetChildrenCount(RenderScope) > 0)
1299
ich =
VisualTreeHelper
.GetChild(RenderScope, 0) as IContentHost;
System\Windows\Controls\Grid.cs (2)
2989
Grid grid =
VisualTreeHelper
.GetParent(child) as Grid;
4001
Grid grid =
VisualTreeHelper
.GetParent(this) as Grid;
System\Windows\Controls\GridSplitter.cs (1)
481
AdornerLayer layer =
VisualTreeHelper
.GetParent(_resizeData.Adorner) as AdornerLayer;
System\Windows\Controls\GridViewColumnHeader.cs (1)
849
Vector offsetVector =
VisualTreeHelper
.GetOffset(FloatSourceHeader);
System\Windows\Controls\GridViewHeaderRowPresenter.cs (1)
927
Visual parent =
VisualTreeHelper
.GetParent(headerAsVisual) as Visual;
System\Windows\Controls\GroupItem.cs (2)
380
parent =
VisualTreeHelper
.GetParent(parent);
396
DependencyObject parentPanel =
VisualTreeHelper
.GetParent(this);
System\Windows\Controls\InkCanvas.cs (1)
567
InkCanvasInnerCanvas p =
VisualTreeHelper
.GetParent(uie) as InkCanvasInnerCanvas;
System\Windows\Controls\ItemContainerGenerator.cs (2)
2733
DependencyObject parent =
VisualTreeHelper
.GetParentInternal(container);
2745
if (parent == null ||
VisualTreeHelper
.GetParentInternal(container) != parent)
System\Windows\Controls\ItemsControl.cs (8)
1185
ui =
VisualTreeHelper
.GetParent(ui) as UIElement;
1340
Visual parent =
VisualTreeHelper
.GetParent(visual) as Visual;
2001
DependencyObject startingParent =
VisualTreeHelper
.GetParent(startingElement);
2011
startingParent =
VisualTreeHelper
.GetParent(startingParent);
3104
Visual parent =
VisualTreeHelper
.GetParent(element) as Visual;
3328
for (DependencyObject current = _itemsHost; current != this && current != null; current =
VisualTreeHelper
.GetParent(current))
3431
element =
VisualTreeHelper
.GetParent(element) as FrameworkElement;
3460
element =
VisualTreeHelper
.GetParent(element) as FrameworkElement;
System\Windows\Controls\ItemsPresenter.cs (4)
50
if (panel == null ||
VisualTreeHelper
.GetChildrenCount(panel) > 0)
181
Visual parent =
VisualTreeHelper
.GetParent(groupItem) as Visual;
185
return
VisualTreeHelper
.GetParent(parent) as ItemsPresenter;
290
ScrollContentPresenter scp =
VisualTreeHelper
.GetParent(this) as ScrollContentPresenter;
System\Windows\Controls\ListBoxItem.cs (1)
339
if (
VisualTreeHelper
.GetParent(this) == null)
System\Windows\Controls\MenuItem.cs (2)
2141
DependencyObject newParent =
VisualTreeHelper
.GetParentInternal(this);
2319
owner =
VisualTreeHelper
.GetParent(this) as ItemsControl;
System\Windows\Controls\Page.cs (1)
653
Visual visualParent =
VisualTreeHelper
.GetParent(this) as Visual;
System\Windows\Controls\PopupControlService.cs (1)
1106
return
VisualTreeHelper
.GetParent(v);
System\Windows\Controls\Primitives\BulletDecorator.cs (8)
392
if (
VisualTreeHelper
.GetChildrenCount(cp) == 1)
394
DependencyObject child =
VisualTreeHelper
.GetChild(cp, 0);
402
VisualTreeHelper
.GetChildrenCount(accessText) == 1)
405
textBlock =
VisualTreeHelper
.GetChild(accessText, 0) as TextBlock;
415
VisualTreeHelper
.GetChildrenCount(accessText) == 1)
418
return
VisualTreeHelper
.GetChild(accessText, 0) as TextBlock;
433
if(
VisualTreeHelper
.GetChildrenCount(cp) == 1)
434
return
VisualTreeHelper
.GetChild(cp, 0) as FlowDocumentScrollViewer;
System\Windows\Controls\Primitives\ButtonBase.cs (1)
96
return focusScope == null ||
VisualTreeHelper
.GetParent(focusScope) == null;
System\Windows\Controls\Primitives\DataGridColumnHeadersPresenter.cs (2)
145
UIElement child = (
VisualTreeHelper
.GetChildrenCount(this) > 0) ?
VisualTreeHelper
.GetChild(this, 0) as UIElement : null;
System\Windows\Controls\Primitives\DataGridDetailsPresenter.cs (2)
146
var childrenCount =
VisualTreeHelper
.GetChildrenCount(this);
149
return
VisualTreeHelper
.GetChild(this, 0) as FrameworkElement;
System\Windows\Controls\Primitives\DocumentPageView.cs (2)
925
visualParent =
VisualTreeHelper
.GetParent(this) as Visual;
933
visualParent =
VisualTreeHelper
.GetParent(visualParent) as Visual;
System\Windows\Controls\Primitives\DocumentViewerBase.cs (1)
1173
if (
VisualTreeHelper
.IsAncestorOf(this, targetObject))
System\Windows\Controls\Primitives\Popup.cs (11)
256
if (newValue == null &&
VisualTreeHelper
.GetParent(this) == null)
264
if (
VisualTreeHelper
.GetParent(this) == null)
319
if (!popup.IsLoaded &&
VisualTreeHelper
.GetParent(popup) != null)
727
parent =
VisualTreeHelper
.GetParent(parent);
905
if ((currentParent =
VisualTreeHelper
.GetParent(child)) != null)
978
if (logicalParent == null &&
VisualTreeHelper
.GetParent(element) != null)
1423
while ((parent =
VisualTreeHelper
.GetParent(root)) != null)
1437
targetVisual =
VisualTreeHelper
.GetContainingVisual2D(
VisualTreeHelper
.GetParent(this));
1813
DependencyObject parent =
VisualTreeHelper
.GetParent(this);
3285
dependencyObject =
VisualTreeHelper
.GetParent(dependencyObject);
System\Windows\Controls\Primitives\ScrollContentPresenter.cs (2)
758
int count =
VisualTreeHelper
.GetChildrenCount(itemsPresenter);
760
si =
VisualTreeHelper
.GetChild(itemsPresenter, 0) as IScrollInfo;
System\Windows\Controls\Primitives\TextBoxBase.cs (1)
1685
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
System\Windows\Controls\Primitives\ToolBarPanel.cs (2)
83
DependencyObject visualParent =
VisualTreeHelper
.GetParent(child);
439
DependencyObject visualParent =
VisualTreeHelper
.GetParent(child);
System\Windows\Controls\Stack.cs (2)
855
DependencyObject parent =
VisualTreeHelper
.GetParent(child);
860
parent =
VisualTreeHelper
.GetParent(dependencyObjectChild);
System\Windows\Controls\StickyNote.cs (1)
993
FrameworkElement parent =
VisualTreeHelper
.GetParent(Content.InnerControl) as FrameworkElement;
System\Windows\Controls\TabControl.cs (1)
565
FrameworkElement visualParent =
VisualTreeHelper
.GetParent(tabItem) as FrameworkElement;
System\Windows\Controls\TextAdaptor.cs (5)
265
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
348
Visual visual =
VisualTreeHelper
.GetParent(textView.RenderScope) as Visual;
352
if (
VisualTreeHelper
.GetClip(visual) != null)
359
Rect rectBounds =
VisualTreeHelper
.GetClip(visual).Bounds;
369
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
System\Windows\Controls\ToolBar.cs (4)
650
Panel itemsHost =
VisualTreeHelper
.GetParent(currentFocusElement) as Panel;
657
newFocusElement =
VisualTreeHelper
.GetChild(itemsHost, 0) as UIElement;
660
newFocusElement =
VisualTreeHelper
.GetChild(itemsHost,
VisualTreeHelper
.GetChildrenCount(itemsHost)-1) as UIElement;
System\Windows\Controls\TreeView.cs (1)
834
return
VisualTreeHelper
.GetParent(v);
System\Windows\Controls\TreeViewItem.cs (5)
482
if (
VisualTreeHelper
.GetParent(this) != null)
839
FrameworkElement parent =
VisualTreeHelper
.GetParent(toggleButton) as FrameworkElement;
842
int count =
VisualTreeHelper
.GetChildrenCount(parent);
845
if (
VisualTreeHelper
.GetChild(parent, index) == toggleButton)
847
header =
VisualTreeHelper
.GetChild(parent, index+1) as FrameworkElement;
System\Windows\Controls\VirtualizingPanel.cs (1)
355
ItemsPresenter itemsPresenter =
VisualTreeHelper
.GetParent(p) as ItemsPresenter;
System\Windows\Controls\VirtualizingStackPanel.cs (15)
839
if (itemsControl == null || !
VisualTreeHelper
.IsAncestorOf(this, _scrollData._firstContainerInViewport))
1099
DependencyObject parent =
VisualTreeHelper
.GetParent(element);
3123
Panel parentPanel = (itemsOwner != null) ?
VisualTreeHelper
.GetParent(itemsOwner) as Panel : null;
3751
VirtualizingPanel vp =
VisualTreeHelper
.GetParent(itemsOwner) as VirtualizingPanel;
4105
VirtualizingPanel virtualizingPanel =
VisualTreeHelper
.GetParent(element) as VirtualizingPanel;
4187
parentItemsControl = ItemsControl.GetItemsOwnerInternal(
VisualTreeHelper
.GetParent(itemsControl)) as ItemsControl;
4205
ItemsControl.GetItemsOwnerInternal(
VisualTreeHelper
.GetParent(itemsOwner)) as IContainItemStorage;
6583
parent =
VisualTreeHelper
.GetParent(parent);
11039
DependencyObject element =
VisualTreeHelper
.GetParent(child);
11113
ItemsControl.GetItemsOwnerInternal(
VisualTreeHelper
.GetParent((Visual)itemStorageProvider)) as IContainItemStorage;
11130
element =
VisualTreeHelper
.GetParent(element);
11146
DependencyObject parent =
VisualTreeHelper
.GetParent(child);
11154
parent =
VisualTreeHelper
.GetParent(child);
12182
VirtualizingStackPanel parent =
VisualTreeHelper
.GetParent(itemsOwner) as VirtualizingStackPanel;
13052
VirtualizingStackPanel vsp =
VisualTreeHelper
.GetParent(container) as VirtualizingStackPanel;
System\Windows\DescendentsWalker.cs (3)
268
if (
VisualTreeHelper
.GetParent(fe) != fe.Parent)
325
if (
VisualTreeHelper
.GetParent(child) != fe.Parent)
378
DependencyObject dependencyObjectParent =
VisualTreeHelper
.GetParent(fe);
System\Windows\DescendentsWalkerBase.cs (1)
45
DependencyObject dependencyObjectParent =
VisualTreeHelper
.GetParent(fe);
System\Windows\Documents\AdornerDecorator.cs (2)
125
if (
VisualTreeHelper
.GetParent(_adornerLayer) != null)
144
if (
VisualTreeHelper
.GetParent(_adornerLayer) != null)
System\Windows\Documents\AdornerLayer.cs (9)
283
PointHitTestResult result = VisualTreeUtils.AsNearestPointHitTestResult(
VisualTreeHelper
.HitTest(this, point, false));
296
visual = (Visual)
VisualTreeHelper
.GetParent(visual);
316
Visual parent =
VisualTreeHelper
.GetParent(visual) as Visual;
325
parent =
VisualTreeHelper
.GetParent(parent) as Visual;
706
Visual adornerLayerParent =
VisualTreeHelper
.GetParent(this) as Visual;
768
Visual adornerLayerParent =
VisualTreeHelper
.GetParent(this) as Visual;
828
Visual adornerLayerParent =
VisualTreeHelper
.GetParent(this) as Visual;
845
Geometry geometry =
VisualTreeHelper
.GetClip(element);
864
element = (Visual)
VisualTreeHelper
.GetParent(element);
System\windows\Documents\CaretElement.cs (1)
850
node =
VisualTreeHelper
.GetParent(node);
System\Windows\Documents\ColumnResizeAdorner.cs (1)
129
adornerLayer =
VisualTreeHelper
.GetParent(this) as AdornerLayer;
System\Windows\Documents\CompositionAdorner.cs (2)
130
Visual parent2d =
VisualTreeHelper
.GetParent(this.AdornedElement) as Visual;
351
AdornerLayer adornerLayer =
VisualTreeHelper
.GetParent(this) as AdornerLayer;
System\Windows\Documents\DocumentSequenceTextView.cs (1)
505
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
System\Windows\Documents\FixedTextView.cs (3)
692
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
780
HitTestResult result =
VisualTreeHelper
.HitTest(this.FixedPage, pt);
792
v =
VisualTreeHelper
.GetParent(v);
System\Windows\Documents\FlowDocument.cs (1)
911
parentOfEmbeddedElement =
VisualTreeHelper
.GetParent((Visual)element);
System\Windows\Documents\RubberbandSelector.cs (8)
236
visual.Clip =
VisualTreeHelper
.GetClip(old);
237
visual.Offset =
VisualTreeHelper
.GetOffset(old);
238
visual.Transform =
VisualTreeHelper
.GetTransform(old);
239
visual.Opacity =
VisualTreeHelper
.GetOpacity(old);
240
visual.OpacityMask =
VisualTreeHelper
.GetOpacityMask(old);
243
visual.BitmapEffectInput =
VisualTreeHelper
.GetBitmapEffectInput(old);
244
visual.BitmapEffect =
VisualTreeHelper
.GetBitmapEffect(old);
253
int count =
VisualTreeHelper
.GetChildrenCount(old);
System\windows\Documents\TextEditorContextMenu.cs (2)
286
for (Visual visual = This.UiScope; visual != null; visual =
VisualTreeHelper
.GetParent(visual) as Visual)
341
Geometry clip =
VisualTreeHelper
.GetClip(element);
System\windows\Documents\TextEditorMouse.cs (4)
621
Visual scrollViewer =
VisualTreeHelper
.GetParent(This.UiScope) as Visual;
624
scrollViewer =
VisualTreeHelper
.GetParent(scrollViewer) as Visual;
778
HitTestResult hitTestResult =
VisualTreeHelper
.HitTest(textEditor.UiScope, point);
810
hitElement =
VisualTreeHelper
.GetParent(hitElement);
System\windows\Documents\TextSelection.cs (3)
2468
element =
VisualTreeHelper
.GetParent(element);
2586
parent =
VisualTreeHelper
.GetParent(element);
2592
parent =
VisualTreeHelper
.GetParent(element);
System\Windows\FrameworkElement.cs (12)
2225
for (Visual v =
VisualTreeHelper
.GetParent(this) as Visual;
2227
v =
VisualTreeHelper
.GetParent(v) as Visual)
2468
DependencyObject newParent =
VisualTreeHelper
.GetParentInternal(this);
2548
FrameworkElement.GetContainingFrameworkElement(
VisualTreeHelper
.GetParent(this), out feParent, out fceParent);
2557
if(feParent == null || !
VisualTreeHelper
.IsAncestorOf(e.Ancestor, feParent))
2560
BroadcastEventHelper.AddOrRemoveHasLoadedChangeHandlerFlag(this, null,
VisualTreeHelper
.GetParent(e.Ancestor));
2563
BroadcastEventHelper.BroadcastLoadedOrUnloadedEvent(this, null,
VisualTreeHelper
.GetParent(e.Ancestor));
2902
DependencyObject visualParent =
VisualTreeHelper
.GetParent(this);
3117
DependencyObject visualParent =
VisualTreeHelper
.GetParent(this);
3980
DependencyObject parentVisual =
VisualTreeHelper
.GetParent(fe);
4016
for (DependencyObject v = visual; v != null; v =
VisualTreeHelper
.GetParent(v))
5546
fe._parent == null &&
VisualTreeHelper
.GetParent(fe) == null &&
System\Windows\Generated\FrameworkElement.cs (2)
712
parent =
VisualTreeHelper
.GetParent(this);
746
parent =
VisualTreeHelper
.GetParent(this);
System\Windows\Input\KeyboardNavigation.cs (14)
680
if (_adornedContentElement != null && (_contentHostParent==null ||
VisualTreeHelper
.GetParent(_contentHostParent as Visual) == null))
792
visualParent =
VisualTreeHelper
.GetParent(visualParent) as Visual;
812
AdornerLayer adornerlayer =
VisualTreeHelper
.GetParent(_focusVisualAdornerCache) as AdornerLayer;
1498
int count =
VisualTreeHelper
.GetChildrenCount(parentAsUIElement);
1502
DependencyObject vchild =
VisualTreeHelper
.GetChild(parentAsUIElement, i);
1559
int count =
VisualTreeHelper
.GetChildrenCount(parentAsUIElement);
1564
DependencyObject vchild =
VisualTreeHelper
.GetChild(parentAsUIElement, i);
1571
DependencyObject visual =
VisualTreeHelper
.GetChild(parentAsUIElement, i);
1672
int count =
VisualTreeHelper
.GetChildrenCount(elementAsVisual);
1675
DependencyObject visual =
VisualTreeHelper
.GetChild(elementAsVisual, i);
1737
int count =
VisualTreeHelper
.GetChildrenCount(elementAsVisual);
1740
DependencyObject visual =
VisualTreeHelper
.GetChild(elementAsVisual, i);
1763
while ((visual =
VisualTreeHelper
.GetParent(visual)) != null)
2444
Visual containingVisual2D =
VisualTreeHelper
.GetContainingVisual2D(uiElement3D);
System\Windows\Shell\WindowChromeWorker.cs (3)
297
if (
VisualTreeHelper
.GetChildrenCount(_window) == 0)
307
FrameworkElement rootElement = (FrameworkElement)
VisualTreeHelper
.GetChild(_window, 0);
1136
FrameworkElement rootElement = (FrameworkElement)
VisualTreeHelper
.GetChild(_window, 0);
System\Windows\StyleHelper.cs (2)
1968
FrameworkElement parent =
VisualTreeHelper
.GetParent(child) as FrameworkElement;
1977
Debug.Assert( null ==
VisualTreeHelper
.GetParent(child),
System\Windows\TreeWalkHelper.cs (1)
1019
DependencyObject visualParent =
VisualTreeHelper
.GetParent(d);
System\Windows\Window.cs (1)
1809
if (
VisualTreeHelper
.GetParent(this) != null )
ReachFramework (21)
AlphaFlattener\BrushProxy.cs (4)
3030
Rect visualBounds =
VisualTreeHelper
.GetDescendantBounds(visual);
3032
Geometry visualClip =
VisualTreeHelper
.GetClip(visual);
3125
Rect visualBounds =
VisualTreeHelper
.GetDescendantBounds(vb.Visual);
3127
Geometry visualClip =
VisualTreeHelper
.GetClip(vb.Visual);
AlphaFlattener\Utility.cs (4)
1595
bounds =
VisualTreeHelper
.GetDescendantBounds(visualBrush.Visual);
1597
Geometry clip =
VisualTreeHelper
.GetClip(visualBrush.Visual);
1788
Transform transform =
VisualTreeHelper
.GetTransform(visual);
1789
Vector offset =
VisualTreeHelper
.GetOffset(visual);
Serialization\DrawingContextFlattener.cs (2)
373
Rect bounds =
VisualTreeHelper
.GetContentBounds(visual);
374
bounds.Union(
VisualTreeHelper
.GetDescendantBounds(visual));
Serialization\Manager\ReachVisualSerializer.cs (2)
254
if (index <
VisualTreeHelper
.GetChildrenCount(nodeVisual))
258
child = (Visual)
VisualTreeHelper
.GetChild(nodeVisual, index);
Serialization\VisualTreeFlattener.cs (9)
441
System.Windows.Media.Drawing content =
VisualTreeHelper
.GetDrawing(visual);
445
if ((
VisualTreeHelper
.GetChildrenCount(visual) == 0) && (Complexity(content) <= 1))
452
Brush mask =
VisualTreeHelper
.GetOpacityMask(visual);
453
double opacity =
VisualTreeHelper
.GetOpacity(visual);
454
Effect effect =
VisualTreeHelper
.GetEffect(visual);
455
Geometry clip =
VisualTreeHelper
.GetClip(visual);
458
Rect bounds =
VisualTreeHelper
.GetDescendantBounds(visual);
652
int count =
VisualTreeHelper
.GetChildrenCount(visual);
657
VisualWalk((Visual)
VisualTreeHelper
.GetChild(visual,i));
System.Windows.Controls.Ribbon (21)
Microsoft\Windows\Controls\Generated\TreeHelper.cs (2)
30
return
VisualTreeHelper
.GetParent(element);
42
parent =
VisualTreeHelper
.GetParent(element);
Microsoft\Windows\Controls\KeyTipService.cs (2)
1312
Visual parent =
VisualTreeHelper
.GetParent(visual) as Visual;
1340
parent =
VisualTreeHelper
.GetParent(parent) as Visual;
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonQuickAccessToolBarPanel.cs (1)
254
UIElement parent =
VisualTreeHelper
.GetParent(this) as UIElement;
Microsoft\Windows\Controls\Ribbon\RibbonComboBox.cs (3)
567
DependencyObject parent =
VisualTreeHelper
.GetParent(_clonedElement);
857
int count =
VisualTreeHelper
.GetChildrenCount(visual);
860
strValue += ExtractString((DependencyObject)(
VisualTreeHelper
.GetChild(visual, i)));
Microsoft\Windows\Controls\Ribbon\RibbonContentPresenter.cs (2)
115
if (
VisualTreeHelper
.GetChildrenCount(this) > 0)
117
_templateRoot =
VisualTreeHelper
.GetChild(this, 0) as FrameworkElement;
Microsoft\Windows\Controls\Ribbon\RibbonControl.cs (2)
214
if (
VisualTreeHelper
.GetChildrenCount(_partContentPresenter) > 0 &&
215
VisualTreeHelper
.GetChild(_partContentPresenter, 0) is RibbonGroup)
Microsoft\Windows\Controls\Ribbon\RibbonGroup.cs (1)
211
RibbonGroupsPanel groupsPanel =
VisualTreeHelper
.GetParent(this) as RibbonGroupsPanel;
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (2)
2953
int childCount =
VisualTreeHelper
.GetChildrenCount(element);
2957
DependencyObject child =
VisualTreeHelper
.GetChild(element, i);
Microsoft\Windows\Controls\Ribbon\RibbonSeparator.cs (1)
110
DependencyObject newParent =
VisualTreeHelper
.GetParent(this);
Microsoft\Windows\Controls\Ribbon\RibbonTabHeader.cs (1)
526
Panel parentPanel =
VisualTreeHelper
.GetParent(this) as Panel;
Microsoft\Windows\Controls\Ribbon\RibbonToolTip.cs (4)
300
DependencyObject visualParent =
VisualTreeHelper
.GetParent(element);
323
(
VisualTreeHelper
.GetChildrenCount(ribbonGroup) > 0 && toolTip.PlacementTarget ==
VisualTreeHelper
.GetChild(ribbonGroup, 0)));
365
element =
VisualTreeHelper
.GetParent(element);
WindowsFormsIntegration (8)
System\Windows\Integration\ElementHost.cs (2)
689
int childCount =
VisualTreeHelper
.GetChildrenCount(element);
693
SetChildElementsIsImeEnabled(
VisualTreeHelper
.GetChild(element, childIndex), isEnabled);
System\Windows\Integration\HostUtils.cs (3)
95
current =
VisualTreeHelper
.GetParent(current);
219
current =
VisualTreeHelper
.GetParent(current);
436
currentObject =
VisualTreeHelper
.GetParent(currentObject);
System\Windows\Integration\WindowsFormsHost.cs (2)
166
{ element =
VisualTreeHelper
.GetParent(element); }
404
DependencyObject parentElement =
VisualTreeHelper
.GetParent(frameworkElement);
System\Windows\Integration\WindowsFormsHostPropertyMap.cs (1)
69
parent =
VisualTreeHelper
.GetParent(parent);