439 references to VisualTreeHelper
Microsoft.VisualStudio.LanguageServices (3)
DocumentOutline\DocumentOutlineView.xaml.cs (2)
333
var container =
VisualTreeHelper
.GetChild(item, 0);
334
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)
45
return
VisualTreeHelper
.GetParent(el) as Visual;
73
Visual parent =
VisualTreeHelper
.GetParent(el) as Visual;
87
Visual parent =
VisualTreeHelper
.GetParent(el) as Visual;
103
Visual test =
VisualTreeHelper
.GetParent(scan) as Visual;
157
PointHitTestResult result = VisualTreeUtils.AsNearestPointHitTestResult(
VisualTreeHelper
.HitTest(root, pointRoot));
MS\Internal\DeferredElementTreeState.cs (2)
34
parent =
VisualTreeHelper
.GetParent(v);
48
parent =
VisualTreeHelper
.GetParent(v3D);
MS\Internal\Ink\Renderer.cs (5)
360
=
VisualTreeHelper
.GetParent(visual) as ContainerVisual;
577
&& (
VisualTreeHelper
.GetParent(precedingVisual) != null))
579
VisualCollection children = ((ContainerVisual)(
VisualTreeHelper
.GetParent(precedingVisual))).Children;
601
ContainerVisual parent = (ContainerVisual)(
VisualTreeHelper
.GetParent(visual));
668
else if (
VisualTreeHelper
.GetParent(hcVisual) == null)
MS\Internal\Media3D\GeneralTransform2DTo3DTo2D.cs (1)
108
Viewport3DVisual viewport3D = (Viewport3DVisual)
VisualTreeHelper
.GetContainingVisual2D(visual3D);
MS\Internal\Media3D\M3DUtil.cs (1)
536
dependencyObject =
VisualTreeHelper
.GetParent(dependencyObject);
MS\Internal\UIElementHelper.cs (1)
78
reference =
VisualTreeHelper
.GetParent(reference);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\PointUtil.cs (2)
143
Transform transform =
VisualTreeHelper
.GetTransform(v);
150
Vector offset =
VisualTreeHelper
.GetOffset(v);
System\Windows\Automation\Peers\UIElement3DAutomationPeer.cs (4)
86
int count =
VisualTreeHelper
.GetChildrenCount(parent);
89
DependencyObject child =
VisualTreeHelper
.GetChild(parent, i);
189
Rect rectRoot = PointUtil.ElementToRoot(rectElement,
VisualTreeHelper
.GetContainingVisual2D(_owner), presentationSource);
247
reference =
VisualTreeHelper
.GetParent(reference);
System\Windows\Automation\Peers\UIElementAutomationPeer.cs (5)
104
int count =
VisualTreeHelper
.GetChildrenCount(parent);
107
DependencyObject child =
VisualTreeHelper
.GetChild(parent, i);
264
DependencyObject parent =
VisualTreeHelper
.GetParent(owner);
274
Geometry clipGeometry =
VisualTreeHelper
.GetClip(visualParent);
294
parent =
VisualTreeHelper
.GetParent(parent);
System\Windows\Diagnostics\VisualDiagnostics.cs (3)
126
isPotentialOuterChange: (changeType==VisualTreeChangeType.Add && index==0 &&
VisualTreeHelper
.GetParent(parent) == null));
176
int count =
VisualTreeHelper
.GetChildrenCount(parent);
179
DependencyObject obj =
VisualTreeHelper
.GetChild(parent, i);
System\Windows\Documents\DocumentPage.cs (1)
104
return
VisualTreeHelper
.GetContentBounds(_visual).Size;
System\Windows\Input\FocusManager.cs (2)
320
dependencyObject =
VisualTreeHelper
.GetParent(dependencyObject);
373
DependencyObject visualParent =
VisualTreeHelper
.GetParent(d);
System\Windows\Input\InputElement.cs (7)
60
DependencyObject parent =
VisualTreeHelper
.GetParent(v);
68
DependencyObject parent =
VisualTreeHelper
.GetParent(v3D);
108
DependencyObject parent =
VisualTreeHelper
.GetParent(v);
116
DependencyObject parent =
VisualTreeHelper
.GetParent(v3D);
190
while(rootVisual != null && ((parentVisual =
VisualTreeHelper
.GetParent(rootVisual)) != null))
229
vFrom =
VisualTreeHelper
.GetContainingVisual2D(vFromAsDO);
304
vToAsVisual =
VisualTreeHelper
.GetContainingVisual2D(vTo);
System\Windows\Input\Manipulation.cs (1)
303
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
System\Windows\Input\Stylus\Common\StylusDevice.cs (2)
338
Visual visualFirstAncestor =
VisualTreeHelper
.GetContainingVisual2D(InputElement.GetContainingVisual(doRelativeTo));
339
Visual visualRoot =
VisualTreeHelper
.GetContainingVisual2D(InputElement.GetRootVisual(doRelativeTo));
System\Windows\Input\Stylus\Common\StylusPlugInCollection.cs (1)
259
Visual root =
VisualTreeHelper
.GetContainingVisual2D(InputElement.GetRootVisual(_element));
System\Windows\Input\Stylus\Common\StylusTouchDeviceBase.cs (1)
126
Visual containingVisual2D =
VisualTreeHelper
.GetContainingVisual2D(containingVisual);
System\Windows\Input\Stylus\Pointer\PointerInteractionEngine.cs (1)
478
DpiScale dpi =
VisualTreeHelper
.GetDpi(_stylusDevice.CriticalActiveSource.RootVisual);
System\Windows\Input\Stylus\Pointer\PointerStylusPlugInManager.cs (9)
83
if (
VisualTreeHelper
.IsAncestorOf(spicAddingVisual, curV))
89
if (!
VisualTreeHelper
.IsAncestorOf(spicAddingVisual, curV))
98
DependencyObject commonParent =
VisualTreeHelper
.FindCommonAncestor(spicAddingVisual, curV);
110
while (
VisualTreeHelper
.GetParentInternal(spicAddingVisual) != commonParent)
111
spicAddingVisual =
VisualTreeHelper
.GetParentInternal(spicAddingVisual);
112
while (
VisualTreeHelper
.GetParentInternal(curV) != commonParent)
113
curV =
VisualTreeHelper
.GetParentInternal(curV);
115
int count =
VisualTreeHelper
.GetChildrenCount(commonParent);
118
DependencyObject child =
VisualTreeHelper
.GetChild(commonParent, j);
System\Windows\Input\Stylus\Pointer\PointerTouchDevice.cs (1)
79
pixelsPerInch =
VisualTreeHelper
.GetDpi(ActiveSource.RootVisual).PixelsPerInchX;
System\Windows\Input\Stylus\Wisp\PenContexts.cs (9)
281
if (
VisualTreeHelper
.IsAncestorOf(spicAddingVisual, curV))
287
if (!
VisualTreeHelper
.IsAncestorOf(spicAddingVisual, curV))
296
DependencyObject commonParent =
VisualTreeHelper
.FindCommonAncestor(spicAddingVisual, curV);
308
while (
VisualTreeHelper
.GetParentInternal(spicAddingVisual) != commonParent)
309
spicAddingVisual =
VisualTreeHelper
.GetParentInternal(spicAddingVisual);
310
while (
VisualTreeHelper
.GetParentInternal(curV) != commonParent)
311
curV =
VisualTreeHelper
.GetParentInternal(curV);
313
int count =
VisualTreeHelper
.GetChildrenCount(commonParent);
316
DependencyObject child =
VisualTreeHelper
.GetChild(commonParent, j);
System\Windows\Input\TouchDevice.cs (1)
1201
currentChild =
VisualTreeHelper
.GetParent(currentChild);
System\Windows\InterOp\HwndMouseInputProvider.cs (1)
294
GeneralTransform gDown = inputSource.RootVisual.TransformToDescendant(
VisualTreeHelper
.GetContainingVisual2D(containingVisual));
System\Windows\InterOp\HwndTarget.cs (2)
1799
int childrenCount =
VisualTreeHelper
.GetChildrenCount(d);
1802
DependencyObject child =
VisualTreeHelper
.GetChild(d, i);
System\Windows\Media\BitmapCacheBrush.cs (4)
201
((
VisualTreeHelper
.GetParent(element) == null && !(element.IsRootElement)) // element is not connected to visual tree, OR
202
|| (
VisualTreeHelper
.GetParent(element) is Visual3D) // element is a 2D child of a 3D object, OR
203
|| (
VisualTreeHelper
.GetParent(element) == InternalTarget))) // element is only connected to visual tree via our wrapper Visual
256
DependencyObject parent =
VisualTreeHelper
.GetParent(element);
System\Windows\Media\Visual.cs (6)
1898
VisualTreeHelper
.HitTest(
4490
while ((
VisualTreeHelper
.GetParent(g) != null) && (g != ancestor))
4569
g =
VisualTreeHelper
.GetContainingVisual2D(gAsVisual3D);
4663
Viewport2DVisual3D containingVisual3D =
VisualTreeHelper
.GetContainingVisual3D(this) as Viewport2DVisual3D;
5090
e =
VisualTreeHelper
.GetParent(e);
5159
e =
VisualTreeHelper
.GetParent(e);
System\Windows\Media\VisualBrush.cs (3)
183
((
VisualTreeHelper
.GetParent(element) == null && !(element.IsRootElement))
184
|| (
VisualTreeHelper
.GetParent(element) is Visual3D)))
223
DependencyObject parent =
VisualTreeHelper
.GetParent(element);
System\Windows\Media\VisualCollection.cs (1)
408
Visual oldParent =
VisualTreeHelper
.GetContainingVisual2D(child._parent);
System\Windows\Media\VisualTreeHelper.cs (2)
177
reference =
VisualTreeHelper
.GetParent(reference);
196
reference =
VisualTreeHelper
.GetParent(reference);
System\Windows\Media3D\Visual3D.cs (6)
457
Debug.Assert(
VisualTreeHelper
.GetParent(this) != null, "If oldParent is null, current parent should != null.");
462
VisualTreeHelper
.GetParent(this),
803
Viewport3DVisual viewport3DVisual = (Viewport3DVisual)
VisualTreeHelper
.GetContainingVisual2D(this);
1672
while ((
VisualTreeHelper
.GetParent(g) != null) && (g != ancestor))
1681
g =
VisualTreeHelper
.GetParent(gAsVisual3D);
1698
Visual3D containing3DParent =
VisualTreeHelper
.GetContainingVisual3D(gAsVisual);
System\Windows\Navigation\BaseUriHelper.cs (1)
585
doCurrent =
VisualTreeHelper
.GetParent(vis);
System\Windows\UIElement.cs (7)
717
for(Visual v =
VisualTreeHelper
.GetParent(this) as Visual; v != null; v =
VisualTreeHelper
.GetParent(v) as Visual)
735
for(Visual v =
VisualTreeHelper
.GetParent(this) as Visual; v != null; v =
VisualTreeHelper
.GetParent(v) as Visual)
1538
if(parent != null &&
VisualTreeHelper
.IsAncestorOf(e.Ancestor, parent))
2032
VisualTreeHelper
.HitTest(this,
2105
candidate =
VisualTreeHelper
.GetParentInternal(candidate);
System\Windows\UIElement3D.cs (1)
238
if (parent != null &&
VisualTreeHelper
.IsAncestorOf(e.Ancestor, parent))
PresentationFramework (287)
MS\Internal\Annotations\Anchoring\PathNode.cs (1)
227
parent =
VisualTreeHelper
.GetParent(visual);
MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (2)
198
int count =
VisualTreeHelper
.GetChildrenCount(dpv);
200
return
VisualTreeHelper
.GetChild(dpv, 0) as DocumentPageHost;
MS\Internal\Annotations\Component\AdornerPresentationContext.cs (5)
142
Visual parent =
VisualTreeHelper
.GetParent(_adornerLayer) as Visual;
393
int count =
VisualTreeHelper
.GetChildrenCount(_adornerLayer);
399
DependencyObject child =
VisualTreeHelper
.GetChild(_adornerLayer, i);
452
int count =
VisualTreeHelper
.GetChildrenCount(adornerLayer);
458
DependencyObject child =
VisualTreeHelper
.GetChild(adornerLayer, i);
MS\Internal\Annotations\Component\AnnotationAdorner.cs (1)
174
AdornerLayer adornerLayer = (AdornerLayer)
VisualTreeHelper
.GetParent(this);
MS\Internal\Controls\InkCanvasFeedbackAdorner.cs (2)
114
UIElement parent = ((UIElement)
VisualTreeHelper
.GetParent(this)) as UIElement;
118
((UIElement)
VisualTreeHelper
.GetParent(this)).InvalidateArrange();
MS\Internal\Controls\InkCanvasInnerCanvas.cs (2)
252
HitTestResult hitTestResult =
VisualTreeHelper
.HitTest(this, point);
272
DependencyObject parent =
VisualTreeHelper
.GetParent(currentObject);
MS\Internal\Data\CommitManager.cs (1)
132
bool result = (ancestor == null) ||
VisualTreeHelper
.IsAncestorOf(ancestor, element);
MS\Internal\Data\ObjectRef.cs (3)
260
ContentPresenter cp =
VisualTreeHelper
.IsVisualType(dd) ?
VisualTreeHelper
.GetParent(dd) as ContentPresenter : null;
511
DependencyObject layout = (v != null) ?
VisualTreeHelper
.GetParent(v) : null;
MS\Internal\Documents\ContentHostHelper.cs (2)
97
if (
VisualTreeHelper
.GetChildrenCount(textView.RenderScope) > 0)
99
ich =
VisualTreeHelper
.GetChild(textView.RenderScope, 0) as IContentHost;
MS\Internal\Documents\DocumentGrid.cs (3)
1310
if (
VisualTreeHelper
.GetParent(this) != null)
2636
HitTestResult result =
VisualTreeHelper
.HitTest(this, point);
2650
currentVisual =
VisualTreeHelper
.GetParent(currentVisual);
MS\Internal\Documents\DocumentPageHost.cs (4)
50
Visual currentParent =
VisualTreeHelper
.GetParent(pageVisual) as Visual;
56
DocumentPageHost docPageHost =
VisualTreeHelper
.GetParent(pageVisualHost) as DocumentPageHost;
87
pageVisualHost =
VisualTreeHelper
.GetParent(_pageVisual) as ContainerVisual;
126
return
VisualTreeHelper
.GetParent(_pageVisual) as Visual;
MS\Internal\Documents\DocumentViewerHelper.cs (6)
341
VisualTreeHelper
.IsAncestorOf(findToolBarHost, focusedElement))
349
VisualTreeHelper
.IsAncestorOf(findToolBarHost, focusedElement))
453
Visual visual =
VisualTreeHelper
.GetParent(originalVisual) as Visual;
456
if (
VisualTreeHelper
.GetClip(visual) != null)
463
Rect rectBounds =
VisualTreeHelper
.GetClip(visual).Bounds;
473
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
MS\Internal\Documents\TextDocumentView.cs (1)
556
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
MS\Internal\Documents\UIElementIsland.cs (1)
38
Visual currentParent =
VisualTreeHelper
.GetParent(_child) as Visual;
MS\Internal\FrameworkObject.cs (7)
310
fo.Reset(
VisualTreeHelper
.GetParent(visual));
318
fo.Reset(
VisualTreeHelper
.GetParent(visual3D));
403
parent =
VisualTreeHelper
.GetParent(_fe);
417
parent =
VisualTreeHelper
.GetParent(visual);
425
parent =
VisualTreeHelper
.GetParent(visual3D);
864
visualParent =
VisualTreeHelper
.GetParent(_fe);
873
visualParent = (visual != null) ?
VisualTreeHelper
.GetParent(visual) : null;
MS\Internal\Helper.cs (13)
446
parent =
VisualTreeHelper
.GetParent(v);
519
UIElement child = (
VisualTreeHelper
.GetChildrenCount(element) > 0) ?
VisualTreeHelper
.GetChild(element, 0) as UIElement : null;
536
UIElement child = (
VisualTreeHelper
.GetChildrenCount(element) > 0) ?
VisualTreeHelper
.GetChild(element, 0) as UIElement : null;
1266
int count =
VisualTreeHelper
.GetChildrenCount(searchStart);
1269
descendant =
VisualTreeHelper
.GetChild(searchStart, i) as FrameworkElement;
1294
element =
VisualTreeHelper
.GetParent(element);
1326
Debug.Assert(
VisualTreeHelper
.IsAncestorOf(pathEndElement, pathStartElement), "pathEndElement should be an ancestor of pathStartElement");
1363
element =
VisualTreeHelper
.GetParent(element);
1386
int childrenCount =
VisualTreeHelper
.GetChildrenCount(d);
1389
DependencyObject child =
VisualTreeHelper
.GetChild(d, i);
1440
parent =
VisualTreeHelper
.GetParent(element);
MS\Internal\Ink\InkCanvasSelection.cs (3)
140
Debug.Assert(
VisualTreeHelper
.GetParent(feedbackAdorner) == null,
155
Debug.Assert(
VisualTreeHelper
.GetParent(_inkCanvas.FeedbackAdorner)
173
Debug.Assert(
VisualTreeHelper
.GetParent(feedbackAdorner) == adornerLayer,
MS\Internal\LayoutDump.cs (6)
216
Geometry clip =
VisualTreeHelper
.GetClip(visual);
248
Geometry clip =
VisualTreeHelper
.GetClip(element);
335
int count =
VisualTreeHelper
.GetChildrenCount(visualParent);
420
int count =
VisualTreeHelper
.GetChildrenCount(visual);
835
int count1 =
VisualTreeHelper
.GetChildrenCount(visual);
839
int count2 =
VisualTreeHelper
.GetChildrenCount(rowVisual);
MS\Internal\PtsHost\Line.cs (1)
406
Visual currentParent =
VisualTreeHelper
.GetParent(inlineObject.UIElementIsland) as Visual;
MS\Internal\PtsHost\PtsHelper.cs (1)
267
Visual currentParent =
VisualTreeHelper
.GetParent(paraClient.Visual) as Visual;
MS\Internal\PtsHost\TableParaClient.cs (4)
1572
||
VisualTreeHelper
.GetParent(cellParaClient.Visual) == null )
1574
Visual currentParent =
VisualTreeHelper
.GetParent(cellParaClient.Visual) as Visual;
1588
&&
VisualTreeHelper
.GetParent(cellParaClient.Visual) != null );
1717
&&
VisualTreeHelper
.GetParent(cellParaClient.Visual) != null );
MS\Internal\PtsHost\TextParaClient.cs (7)
2266
int count =
VisualTreeHelper
.GetChildrenCount(Visual);
2279
visual =
VisualTreeHelper
.GetChild(Visual, visualIndex) as LineVisual;
2281
Invariant.Assert(visual != null ||
VisualTreeHelper
.GetChild(Visual, visualIndex) == null);
2296
int count =
VisualTreeHelper
.GetChildrenCount(Visual);
2302
if(
VisualTreeHelper
.GetChild(Visual, visualIndex) is ParagraphElementVisual)
2308
visual =
VisualTreeHelper
.GetChild(temp, visualIndex) as LineVisual;
2310
Invariant.Assert(visual != null ||
VisualTreeHelper
.GetChild(temp, visualIndex) == null);
MS\Internal\PtsHost\UIElementParaClient.cs (1)
113
Visual currentParent =
VisualTreeHelper
.GetParent(uiElementIsland) as Visual;
MS\Internal\Text\ComplexLine.cs (1)
166
Visual currentParent =
VisualTreeHelper
.GetParent(inlineObject.Element) as Visual;
System\Windows\Annotations\AnnotationDocumentPaginator.cs (2)
395
Invariant.Assert(
VisualTreeHelper
.GetChildrenCount(dpv) == 1, "DocumentPageView has no visual children.");
396
DependencyObject firstElement =
VisualTreeHelper
.GetChild(dpv, 0);
System\Windows\Automation\Peers\DocumentAutomationPeer.cs (3)
246
if (
VisualTreeHelper
.GetClip(visual) != null)
253
Rect clipBounds =
VisualTreeHelper
.GetClip(visual).Bounds;
263
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
System\Windows\Automation\Peers\TextElementAutomationPeer.cs (3)
175
if (
VisualTreeHelper
.GetClip(visual) != null)
183
Rect rectBounds =
VisualTreeHelper
.GetClip(visual).Bounds;
195
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
System\Windows\Automation\Peers\TreeViewItemAutomationPeer.cs (2)
82
int count =
VisualTreeHelper
.GetChildrenCount(parent);
85
DependencyObject child =
VisualTreeHelper
.GetChild(parent, i);
System\Windows\BroadcastEventHelper.cs (6)
480
visual =
VisualTreeHelper
.GetContainingVisual2D(visual3D);
582
int count =
VisualTreeHelper
.GetChildrenCount(v);
586
FrameworkElement child =
VisualTreeHelper
.GetChild(v, i) as FrameworkElement;
631
DependencyObject coreParent = (fo.IsFE) ?
VisualTreeHelper
.GetParent(fo.FE) : null;
695
coreParent =
VisualTreeHelper
.GetParent(v);
703
coreParent =
VisualTreeHelper
.GetParent(v3D);
System\Windows\Controls\AdornedElementPlaceholder.cs (1)
222
_templatedAdorner =
VisualTreeHelper
.GetParent(templateParent) as TemplatedAdorner;
System\Windows\Controls\Canvas.cs (1)
189
Canvas p =
VisualTreeHelper
.GetParent(uie) as Canvas;
System\Windows\Controls\ComboBox.cs (4)
226
if (comboBox._clonedElement != null &&
VisualTreeHelper
.GetParent(comboBox._clonedElement) == null)
915
DependencyObject parent =
VisualTreeHelper
.GetParent(_clonedElement);
1603
int count =
VisualTreeHelper
.GetChildrenCount(visual);
1606
strValue += ExtractString((DependencyObject)(
VisualTreeHelper
.GetChild(visual, i)));
System\Windows\Controls\DataGrid.cs (3)
6344
sourceElement =
VisualTreeHelper
.GetParent(sourceElement) as UIElement;
6576
element =
VisualTreeHelper
.GetParent(row) as UIElement;
6597
element =
VisualTreeHelper
.GetParent(cell) as UIElement;
System\Windows\Controls\DataGridCellsPanel.cs (4)
82
UIElement parent =
VisualTreeHelper
.GetParent(this) as UIElement;
709
if (isRecycled &&
VisualTreeHelper
.GetParent(container) != null)
731
if (isRecycled &&
VisualTreeHelper
.GetParent(container) != null)
1851
return
VisualTreeHelper
.GetParent(row) as DataGridRowsPresenter;
System\Windows\Controls\DataGridColumnFloatingHeader.cs (1)
144
Vector offset =
VisualTreeHelper
.GetOffset(_referenceHeader);
System\Windows\Controls\DataGridHelper.cs (6)
178
parent =
VisualTreeHelper
.GetParent(parent) as UIElement;
212
int childCount =
VisualTreeHelper
.GetChildrenCount(element);
215
DependencyObject child =
VisualTreeHelper
.GetChild(element, i) as DependencyObject;
303
return
VisualTreeHelper
.GetParent(element) as DataGridCellsPanel;
567
return
VisualTreeHelper
.IsAncestorOf(element, contextElement, typeof(T));
660
VisualTreeHelper
.IsAncestorOf(cell, targetElement, typeof(DataGridCell)))
System\Windows\Controls\DockPanel.cs (1)
123
DockPanel p =
VisualTreeHelper
.GetParent(uie) as DockPanel;
System\Windows\Controls\FlowDocumentScrollViewer.cs (2)
1282
if (RenderScope != null &&
VisualTreeHelper
.GetChildrenCount(RenderScope) > 0)
1284
ich =
VisualTreeHelper
.GetChild(RenderScope, 0) as IContentHost;
System\Windows\Controls\Grid.cs (2)
2972
Grid grid =
VisualTreeHelper
.GetParent(child) as Grid;
3984
Grid grid =
VisualTreeHelper
.GetParent(this) as Grid;
System\Windows\Controls\GridSplitter.cs (1)
478
AdornerLayer layer =
VisualTreeHelper
.GetParent(_resizeData.Adorner) as AdornerLayer;
System\Windows\Controls\GridViewColumnHeader.cs (1)
834
Vector offsetVector =
VisualTreeHelper
.GetOffset(FloatSourceHeader);
System\Windows\Controls\GridViewHeaderRowPresenter.cs (1)
923
Visual parent =
VisualTreeHelper
.GetParent(headerAsVisual) as Visual;
System\Windows\Controls\GroupItem.cs (2)
368
parent =
VisualTreeHelper
.GetParent(parent);
384
DependencyObject parentPanel =
VisualTreeHelper
.GetParent(this);
System\Windows\Controls\InkCanvas.cs (1)
564
InkCanvasInnerCanvas p =
VisualTreeHelper
.GetParent(uie) as InkCanvasInnerCanvas;
System\Windows\Controls\ItemContainerGenerator.cs (2)
2725
DependencyObject parent =
VisualTreeHelper
.GetParentInternal(container);
2737
if (parent == null ||
VisualTreeHelper
.GetParentInternal(container) != parent)
System\Windows\Controls\ItemsControl.cs (8)
1163
ui =
VisualTreeHelper
.GetParent(ui) as UIElement;
1318
Visual parent =
VisualTreeHelper
.GetParent(visual) as Visual;
1961
DependencyObject startingParent =
VisualTreeHelper
.GetParent(startingElement);
1971
startingParent =
VisualTreeHelper
.GetParent(startingParent);
3064
Visual parent =
VisualTreeHelper
.GetParent(element) as Visual;
3288
for (DependencyObject current = _itemsHost; current != this && current != null; current =
VisualTreeHelper
.GetParent(current))
3391
element =
VisualTreeHelper
.GetParent(element) as FrameworkElement;
3420
element =
VisualTreeHelper
.GetParent(element) as FrameworkElement;
System\Windows\Controls\ItemsPresenter.cs (4)
45
if (panel == null ||
VisualTreeHelper
.GetChildrenCount(panel) > 0)
176
Visual parent =
VisualTreeHelper
.GetParent(groupItem) as Visual;
180
return
VisualTreeHelper
.GetParent(parent) as ItemsPresenter;
285
ScrollContentPresenter scp =
VisualTreeHelper
.GetParent(this) as ScrollContentPresenter;
System\Windows\Controls\ListBoxItem.cs (1)
325
if (
VisualTreeHelper
.GetParent(this) == null)
System\Windows\Controls\MenuItem.cs (2)
2123
DependencyObject newParent =
VisualTreeHelper
.GetParentInternal(this);
2303
owner =
VisualTreeHelper
.GetParent(this) as ItemsControl;
System\Windows\Controls\Page.cs (1)
629
Visual visualParent =
VisualTreeHelper
.GetParent(this) as Visual;
System\Windows\Controls\PopupControlService.cs (1)
1102
return
VisualTreeHelper
.GetParent(v);
System\Windows\Controls\Primitives\BulletDecorator.cs (8)
385
if (
VisualTreeHelper
.GetChildrenCount(cp) == 1)
387
DependencyObject child =
VisualTreeHelper
.GetChild(cp, 0);
395
VisualTreeHelper
.GetChildrenCount(accessText) == 1)
398
textBlock =
VisualTreeHelper
.GetChild(accessText, 0) as TextBlock;
408
VisualTreeHelper
.GetChildrenCount(accessText) == 1)
411
return
VisualTreeHelper
.GetChild(accessText, 0) as TextBlock;
426
if(
VisualTreeHelper
.GetChildrenCount(cp) == 1)
427
return
VisualTreeHelper
.GetChild(cp, 0) as FlowDocumentScrollViewer;
System\Windows\Controls\Primitives\ButtonBase.cs (1)
84
return focusScope == null ||
VisualTreeHelper
.GetParent(focusScope) == null;
System\Windows\Controls\Primitives\DataGridColumnHeadersPresenter.cs (2)
139
UIElement child = (
VisualTreeHelper
.GetChildrenCount(this) > 0) ?
VisualTreeHelper
.GetChild(this, 0) as UIElement : null;
System\Windows\Controls\Primitives\DataGridDetailsPresenter.cs (2)
141
var childrenCount =
VisualTreeHelper
.GetChildrenCount(this);
144
return
VisualTreeHelper
.GetChild(this, 0) as FrameworkElement;
System\Windows\Controls\Primitives\DocumentPageView.cs (2)
918
visualParent =
VisualTreeHelper
.GetParent(this) as Visual;
926
visualParent =
VisualTreeHelper
.GetParent(visualParent) as Visual;
System\Windows\Controls\Primitives\DocumentViewerBase.cs (1)
1145
if (
VisualTreeHelper
.IsAncestorOf(this, targetObject))
System\Windows\Controls\Primitives\Popup.cs (11)
244
if (newValue == null &&
VisualTreeHelper
.GetParent(this) == null)
252
if (
VisualTreeHelper
.GetParent(this) == null)
307
if (!popup.IsLoaded &&
VisualTreeHelper
.GetParent(popup) != null)
715
parent =
VisualTreeHelper
.GetParent(parent);
893
if ((currentParent =
VisualTreeHelper
.GetParent(child)) != null)
984
if (logicalParent == null &&
VisualTreeHelper
.GetParent(element) != null)
1428
while ((parent =
VisualTreeHelper
.GetParent(root)) != null)
1442
targetVisual =
VisualTreeHelper
.GetContainingVisual2D(
VisualTreeHelper
.GetParent(this));
1818
DependencyObject parent =
VisualTreeHelper
.GetParent(this);
3286
dependencyObject =
VisualTreeHelper
.GetParent(dependencyObject);
System\Windows\Controls\Primitives\ScrollContentPresenter.cs (2)
742
int count =
VisualTreeHelper
.GetChildrenCount(itemsPresenter);
744
si =
VisualTreeHelper
.GetChild(itemsPresenter, 0) as IScrollInfo;
System\Windows\Controls\Primitives\TextBoxBase.cs (1)
1611
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
System\Windows\Controls\Primitives\ToolBarPanel.cs (2)
73
DependencyObject visualParent =
VisualTreeHelper
.GetParent(child);
425
DependencyObject visualParent =
VisualTreeHelper
.GetParent(child);
System\Windows\Controls\Stack.cs (2)
844
DependencyObject parent =
VisualTreeHelper
.GetParent(child);
849
parent =
VisualTreeHelper
.GetParent(dependencyObjectChild);
System\Windows\Controls\StickyNote.cs (1)
957
FrameworkElement parent =
VisualTreeHelper
.GetParent(Content.InnerControl) as FrameworkElement;
System\Windows\Controls\TabControl.cs (1)
545
FrameworkElement visualParent =
VisualTreeHelper
.GetParent(tabItem) as FrameworkElement;
System\Windows\Controls\TextAdaptor.cs (5)
261
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
338
Visual visual =
VisualTreeHelper
.GetParent(textView.RenderScope) as Visual;
342
if (
VisualTreeHelper
.GetClip(visual) != null)
349
Rect rectBounds =
VisualTreeHelper
.GetClip(visual).Bounds;
359
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
System\Windows\Controls\ToolBar.cs (4)
634
Panel itemsHost =
VisualTreeHelper
.GetParent(currentFocusElement) as Panel;
641
newFocusElement =
VisualTreeHelper
.GetChild(itemsHost, 0) as UIElement;
644
newFocusElement =
VisualTreeHelper
.GetChild(itemsHost,
VisualTreeHelper
.GetChildrenCount(itemsHost)-1) as UIElement;
System\Windows\Controls\TreeView.cs (1)
826
return
VisualTreeHelper
.GetParent(v);
System\Windows\Controls\TreeViewItem.cs (5)
471
if (
VisualTreeHelper
.GetParent(this) != null)
820
FrameworkElement parent =
VisualTreeHelper
.GetParent(toggleButton) as FrameworkElement;
823
int count =
VisualTreeHelper
.GetChildrenCount(parent);
826
if (
VisualTreeHelper
.GetChild(parent, index) == toggleButton)
828
header =
VisualTreeHelper
.GetChild(parent, index+1) as FrameworkElement;
System\Windows\Controls\VirtualizingPanel.cs (1)
348
ItemsPresenter itemsPresenter =
VisualTreeHelper
.GetParent(p) as ItemsPresenter;
System\Windows\Controls\VirtualizingStackPanel.cs (15)
833
if (itemsControl == null || !
VisualTreeHelper
.IsAncestorOf(this, _scrollData._firstContainerInViewport))
1093
DependencyObject parent =
VisualTreeHelper
.GetParent(element);
3106
Panel parentPanel = (itemsOwner != null) ?
VisualTreeHelper
.GetParent(itemsOwner) as Panel : null;
3731
VirtualizingPanel vp =
VisualTreeHelper
.GetParent(itemsOwner) as VirtualizingPanel;
4079
VirtualizingPanel virtualizingPanel =
VisualTreeHelper
.GetParent(element) as VirtualizingPanel;
4161
parentItemsControl = ItemsControl.GetItemsOwnerInternal(
VisualTreeHelper
.GetParent(itemsControl)) as ItemsControl;
4179
ItemsControl.GetItemsOwnerInternal(
VisualTreeHelper
.GetParent(itemsOwner)) as IContainItemStorage;
6554
parent =
VisualTreeHelper
.GetParent(parent);
11011
DependencyObject element =
VisualTreeHelper
.GetParent(child);
11085
ItemsControl.GetItemsOwnerInternal(
VisualTreeHelper
.GetParent((Visual)itemStorageProvider)) as IContainItemStorage;
11102
element =
VisualTreeHelper
.GetParent(element);
11118
DependencyObject parent =
VisualTreeHelper
.GetParent(child);
11126
parent =
VisualTreeHelper
.GetParent(child);
12155
VirtualizingStackPanel parent =
VisualTreeHelper
.GetParent(itemsOwner) as VirtualizingStackPanel;
13021
VirtualizingStackPanel vsp =
VisualTreeHelper
.GetParent(container) as VirtualizingStackPanel;
System\Windows\DescendentsWalker.cs (3)
262
if (
VisualTreeHelper
.GetParent(fe) != fe.Parent)
319
if (
VisualTreeHelper
.GetParent(child) != fe.Parent)
372
DependencyObject dependencyObjectParent =
VisualTreeHelper
.GetParent(fe);
System\Windows\DescendentsWalkerBase.cs (1)
40
DependencyObject dependencyObjectParent =
VisualTreeHelper
.GetParent(fe);
System\Windows\Documents\AdornerDecorator.cs (2)
120
if (
VisualTreeHelper
.GetParent(_adornerLayer) != null)
139
if (
VisualTreeHelper
.GetParent(_adornerLayer) != null)
System\Windows\Documents\AdornerLayer.cs (9)
278
PointHitTestResult result = VisualTreeUtils.AsNearestPointHitTestResult(
VisualTreeHelper
.HitTest(this, point, false));
291
visual = (Visual)
VisualTreeHelper
.GetParent(visual);
311
Visual parent =
VisualTreeHelper
.GetParent(visual) as Visual;
320
parent =
VisualTreeHelper
.GetParent(parent) as Visual;
703
Visual adornerLayerParent =
VisualTreeHelper
.GetParent(this) as Visual;
765
Visual adornerLayerParent =
VisualTreeHelper
.GetParent(this) as Visual;
825
Visual adornerLayerParent =
VisualTreeHelper
.GetParent(this) as Visual;
842
Geometry geometry =
VisualTreeHelper
.GetClip(element);
863
element = (Visual)
VisualTreeHelper
.GetParent(element);
System\windows\Documents\CaretElement.cs (1)
847
node =
VisualTreeHelper
.GetParent(node);
System\Windows\Documents\ColumnResizeAdorner.cs (1)
120
adornerLayer =
VisualTreeHelper
.GetParent(this) as AdornerLayer;
System\Windows\Documents\CompositionAdorner.cs (2)
126
Visual parent2d =
VisualTreeHelper
.GetParent(this.AdornedElement) as Visual;
349
AdornerLayer adornerLayer =
VisualTreeHelper
.GetParent(this) as AdornerLayer;
System\Windows\Documents\DocumentSequenceTextView.cs (1)
490
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
System\Windows\Documents\FixedTextView.cs (3)
678
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
766
HitTestResult result =
VisualTreeHelper
.HitTest(this.FixedPage, pt);
778
v =
VisualTreeHelper
.GetParent(v);
System\Windows\Documents\FlowDocument.cs (1)
907
parentOfEmbeddedElement =
VisualTreeHelper
.GetParent((Visual)element);
System\Windows\Documents\RubberbandSelector.cs (8)
222
visual.Clip =
VisualTreeHelper
.GetClip(old);
223
visual.Offset =
VisualTreeHelper
.GetOffset(old);
224
visual.Transform =
VisualTreeHelper
.GetTransform(old);
225
visual.Opacity =
VisualTreeHelper
.GetOpacity(old);
226
visual.OpacityMask =
VisualTreeHelper
.GetOpacityMask(old);
229
visual.BitmapEffectInput =
VisualTreeHelper
.GetBitmapEffectInput(old);
230
visual.BitmapEffect =
VisualTreeHelper
.GetBitmapEffect(old);
239
int count =
VisualTreeHelper
.GetChildrenCount(old);
System\windows\Documents\TextEditorContextMenu.cs (2)
283
for (Visual visual = This.UiScope; visual != null; visual =
VisualTreeHelper
.GetParent(visual) as Visual)
338
Geometry clip =
VisualTreeHelper
.GetClip(element);
System\windows\Documents\TextEditorMouse.cs (4)
603
Visual scrollViewer =
VisualTreeHelper
.GetParent(This.UiScope) as Visual;
606
scrollViewer =
VisualTreeHelper
.GetParent(scrollViewer) as Visual;
760
HitTestResult hitTestResult =
VisualTreeHelper
.HitTest(textEditor.UiScope, point);
792
hitElement =
VisualTreeHelper
.GetParent(hitElement);
System\windows\Documents\TextSelection.cs (3)
2451
element =
VisualTreeHelper
.GetParent(element);
2569
parent =
VisualTreeHelper
.GetParent(element);
2575
parent =
VisualTreeHelper
.GetParent(element);
System\Windows\FrameworkElement.cs (12)
2205
for (Visual v =
VisualTreeHelper
.GetParent(this) as Visual;
2207
v =
VisualTreeHelper
.GetParent(v) as Visual)
2448
DependencyObject newParent =
VisualTreeHelper
.GetParentInternal(this);
2528
FrameworkElement.GetContainingFrameworkElement(
VisualTreeHelper
.GetParent(this), out feParent, out fceParent);
2537
if(feParent == null || !
VisualTreeHelper
.IsAncestorOf(e.Ancestor, feParent))
2540
BroadcastEventHelper.AddOrRemoveHasLoadedChangeHandlerFlag(this, null,
VisualTreeHelper
.GetParent(e.Ancestor));
2543
BroadcastEventHelper.BroadcastLoadedOrUnloadedEvent(this, null,
VisualTreeHelper
.GetParent(e.Ancestor));
2882
DependencyObject visualParent =
VisualTreeHelper
.GetParent(this);
3094
DependencyObject visualParent =
VisualTreeHelper
.GetParent(this);
3959
DependencyObject parentVisual =
VisualTreeHelper
.GetParent(fe);
3995
for (DependencyObject v = visual; v != null; v =
VisualTreeHelper
.GetParent(v))
5533
fe._parent == null &&
VisualTreeHelper
.GetParent(fe) == null &&
System\Windows\Generated\FrameworkElement.cs (2)
703
parent =
VisualTreeHelper
.GetParent(this);
737
parent =
VisualTreeHelper
.GetParent(this);
System\Windows\Input\KeyboardNavigation.cs (14)
673
if (_adornedContentElement != null && (_contentHostParent==null ||
VisualTreeHelper
.GetParent(_contentHostParent as Visual) == null))
784
visualParent =
VisualTreeHelper
.GetParent(visualParent) as Visual;
804
AdornerLayer adornerlayer =
VisualTreeHelper
.GetParent(_focusVisualAdornerCache) as AdornerLayer;
1486
int count =
VisualTreeHelper
.GetChildrenCount(parentAsUIElement);
1490
DependencyObject vchild =
VisualTreeHelper
.GetChild(parentAsUIElement, i);
1547
int count =
VisualTreeHelper
.GetChildrenCount(parentAsUIElement);
1552
DependencyObject vchild =
VisualTreeHelper
.GetChild(parentAsUIElement, i);
1559
DependencyObject visual =
VisualTreeHelper
.GetChild(parentAsUIElement, i);
1660
int count =
VisualTreeHelper
.GetChildrenCount(elementAsVisual);
1663
DependencyObject visual =
VisualTreeHelper
.GetChild(elementAsVisual, i);
1725
int count =
VisualTreeHelper
.GetChildrenCount(elementAsVisual);
1728
DependencyObject visual =
VisualTreeHelper
.GetChild(elementAsVisual, i);
1751
while ((visual =
VisualTreeHelper
.GetParent(visual)) != null)
2432
Visual containingVisual2D =
VisualTreeHelper
.GetContainingVisual2D(uiElement3D);
System\Windows\Shell\WindowChromeWorker.cs (3)
291
if (
VisualTreeHelper
.GetChildrenCount(_window) == 0)
301
FrameworkElement rootElement = (FrameworkElement)
VisualTreeHelper
.GetChild(_window, 0);
1130
FrameworkElement rootElement = (FrameworkElement)
VisualTreeHelper
.GetChild(_window, 0);
System\Windows\StyleHelper.cs (2)
1959
FrameworkElement parent =
VisualTreeHelper
.GetParent(child) as FrameworkElement;
1968
Debug.Assert( null ==
VisualTreeHelper
.GetParent(child),
System\Windows\TreeWalkHelper.cs (1)
1011
DependencyObject visualParent =
VisualTreeHelper
.GetParent(d);
System\Windows\Window.cs (1)
1781
if (
VisualTreeHelper
.GetParent(this) != null )
ReachFramework (21)
AlphaFlattener\BrushProxy.cs (4)
3026
Rect visualBounds =
VisualTreeHelper
.GetDescendantBounds(visual);
3028
Geometry visualClip =
VisualTreeHelper
.GetClip(visual);
3123
Rect visualBounds =
VisualTreeHelper
.GetDescendantBounds(vb.Visual);
3125
Geometry visualClip =
VisualTreeHelper
.GetClip(vb.Visual);
AlphaFlattener\Utility.cs (4)
1584
bounds =
VisualTreeHelper
.GetDescendantBounds(visualBrush.Visual);
1586
Geometry clip =
VisualTreeHelper
.GetClip(visualBrush.Visual);
1777
Transform transform =
VisualTreeHelper
.GetTransform(visual);
1778
Vector offset =
VisualTreeHelper
.GetOffset(visual);
Serialization\DrawingContextFlattener.cs (2)
362
Rect bounds =
VisualTreeHelper
.GetContentBounds(visual);
363
bounds.Union(
VisualTreeHelper
.GetDescendantBounds(visual));
Serialization\Manager\ReachVisualSerializer.cs (2)
240
if (index <
VisualTreeHelper
.GetChildrenCount(nodeVisual))
244
child = (Visual)
VisualTreeHelper
.GetChild(nodeVisual, index);
Serialization\VisualTreeFlattener.cs (9)
433
System.Windows.Media.Drawing content =
VisualTreeHelper
.GetDrawing(visual);
437
if ((
VisualTreeHelper
.GetChildrenCount(visual) == 0) && (Complexity(content) <= 1))
444
Brush mask =
VisualTreeHelper
.GetOpacityMask(visual);
445
double opacity =
VisualTreeHelper
.GetOpacity(visual);
446
Effect effect =
VisualTreeHelper
.GetEffect(visual);
447
Geometry clip =
VisualTreeHelper
.GetClip(visual);
450
Rect bounds =
VisualTreeHelper
.GetDescendantBounds(visual);
644
int count =
VisualTreeHelper
.GetChildrenCount(visual);
649
VisualWalk((Visual)
VisualTreeHelper
.GetChild(visual,i));
System.Windows.Controls.Ribbon (21)
Microsoft\Windows\Controls\Generated\TreeHelper.cs (2)
29
return
VisualTreeHelper
.GetParent(element);
41
parent =
VisualTreeHelper
.GetParent(element);
Microsoft\Windows\Controls\KeyTipService.cs (2)
1304
Visual parent =
VisualTreeHelper
.GetParent(visual) as Visual;
1332
parent =
VisualTreeHelper
.GetParent(parent) as Visual;
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonQuickAccessToolBarPanel.cs (1)
247
UIElement parent =
VisualTreeHelper
.GetParent(this) as UIElement;
Microsoft\Windows\Controls\Ribbon\RibbonComboBox.cs (3)
565
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)
109
if (
VisualTreeHelper
.GetChildrenCount(this) > 0)
111
_templateRoot =
VisualTreeHelper
.GetChild(this, 0) as FrameworkElement;
Microsoft\Windows\Controls\Ribbon\RibbonControl.cs (2)
209
if (
VisualTreeHelper
.GetChildrenCount(_partContentPresenter) > 0 &&
210
VisualTreeHelper
.GetChild(_partContentPresenter, 0) is RibbonGroup)
Microsoft\Windows\Controls\Ribbon\RibbonGroup.cs (1)
207
RibbonGroupsPanel groupsPanel =
VisualTreeHelper
.GetParent(this) as RibbonGroupsPanel;
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (2)
2930
int childCount =
VisualTreeHelper
.GetChildrenCount(element);
2934
DependencyObject child =
VisualTreeHelper
.GetChild(element, i);
Microsoft\Windows\Controls\Ribbon\RibbonSeparator.cs (1)
106
DependencyObject newParent =
VisualTreeHelper
.GetParent(this);
Microsoft\Windows\Controls\Ribbon\RibbonTabHeader.cs (1)
523
Panel parentPanel =
VisualTreeHelper
.GetParent(this) as Panel;
Microsoft\Windows\Controls\Ribbon\RibbonToolTip.cs (4)
296
DependencyObject visualParent =
VisualTreeHelper
.GetParent(element);
319
(
VisualTreeHelper
.GetChildrenCount(ribbonGroup) > 0 && toolTip.PlacementTarget ==
VisualTreeHelper
.GetChild(ribbonGroup, 0)));
361
element =
VisualTreeHelper
.GetParent(element);
WindowsFormsIntegration (8)
System\Windows\Integration\ElementHost.cs (2)
685
int childCount =
VisualTreeHelper
.GetChildrenCount(element);
689
SetChildElementsIsImeEnabled(
VisualTreeHelper
.GetChild(element, childIndex), isEnabled);
System\Windows\Integration\HostUtils.cs (3)
90
current =
VisualTreeHelper
.GetParent(current);
214
current =
VisualTreeHelper
.GetParent(current);
431
currentObject =
VisualTreeHelper
.GetParent(currentObject);
System\Windows\Integration\WindowsFormsHost.cs (2)
163
{ element =
VisualTreeHelper
.GetParent(element); }
395
DependencyObject parentElement =
VisualTreeHelper
.GetParent(frameworkElement);
System\Windows\Integration\WindowsFormsHostPropertyMap.cs (1)
67
parent =
VisualTreeHelper
.GetParent(parent);