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)
46
return
VisualTreeHelper
.GetParent(el) as Visual;
74
Visual parent =
VisualTreeHelper
.GetParent(el) as Visual;
88
Visual parent =
VisualTreeHelper
.GetParent(el) as Visual;
104
Visual test =
VisualTreeHelper
.GetParent(scan) as Visual;
158
PointHitTestResult result = VisualTreeUtils.AsNearestPointHitTestResult(
VisualTreeHelper
.HitTest(root, pointRoot));
MS\Internal\DeferredElementTreeState.cs (2)
35
parent =
VisualTreeHelper
.GetParent(v);
49
parent =
VisualTreeHelper
.GetParent(v3D);
MS\Internal\Ink\Renderer.cs (5)
361
=
VisualTreeHelper
.GetParent(visual) as ContainerVisual;
578
&& (
VisualTreeHelper
.GetParent(precedingVisual) != null))
580
VisualCollection children = ((ContainerVisual)(
VisualTreeHelper
.GetParent(precedingVisual))).Children;
602
ContainerVisual parent = (ContainerVisual)(
VisualTreeHelper
.GetParent(visual));
667
else if (
VisualTreeHelper
.GetParent(hcVisual) == null)
MS\Internal\Media3D\GeneralTransform2DTo3DTo2D.cs (1)
110
Viewport3DVisual viewport3D = (Viewport3DVisual)
VisualTreeHelper
.GetContainingVisual2D(visual3D);
MS\Internal\Media3D\M3DUtil.cs (1)
540
dependencyObject =
VisualTreeHelper
.GetParent(dependencyObject);
MS\Internal\UIElementHelper.cs (1)
79
reference =
VisualTreeHelper
.GetParent(reference);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\PointUtil.cs (2)
144
Transform transform =
VisualTreeHelper
.GetTransform(v);
151
Vector offset =
VisualTreeHelper
.GetOffset(v);
System\Windows\Automation\Peers\UIElement3DAutomationPeer.cs (4)
87
int count =
VisualTreeHelper
.GetChildrenCount(parent);
90
DependencyObject child =
VisualTreeHelper
.GetChild(parent, i);
190
Rect rectRoot = PointUtil.ElementToRoot(rectElement,
VisualTreeHelper
.GetContainingVisual2D(_owner), presentationSource);
248
reference =
VisualTreeHelper
.GetParent(reference);
System\Windows\Automation\Peers\UIElementAutomationPeer.cs (5)
105
int count =
VisualTreeHelper
.GetChildrenCount(parent);
108
DependencyObject child =
VisualTreeHelper
.GetChild(parent, i);
265
DependencyObject parent =
VisualTreeHelper
.GetParent(owner);
275
Geometry clipGeometry =
VisualTreeHelper
.GetClip(visualParent);
295
parent =
VisualTreeHelper
.GetParent(parent);
System\Windows\Diagnostics\VisualDiagnostics.cs (3)
127
isPotentialOuterChange: (changeType==VisualTreeChangeType.Add && index==0 &&
VisualTreeHelper
.GetParent(parent) == null));
177
int count =
VisualTreeHelper
.GetChildrenCount(parent);
180
DependencyObject obj =
VisualTreeHelper
.GetChild(parent, i);
System\Windows\Documents\DocumentPage.cs (1)
105
return
VisualTreeHelper
.GetContentBounds(_visual).Size;
System\Windows\Input\FocusManager.cs (2)
324
dependencyObject =
VisualTreeHelper
.GetParent(dependencyObject);
377
DependencyObject visualParent =
VisualTreeHelper
.GetParent(d);
System\Windows\Input\InputElement.cs (7)
61
DependencyObject parent =
VisualTreeHelper
.GetParent(v);
69
DependencyObject parent =
VisualTreeHelper
.GetParent(v3D);
109
DependencyObject parent =
VisualTreeHelper
.GetParent(v);
117
DependencyObject parent =
VisualTreeHelper
.GetParent(v3D);
191
while(rootVisual != null && ((parentVisual =
VisualTreeHelper
.GetParent(rootVisual)) != null))
230
vFrom =
VisualTreeHelper
.GetContainingVisual2D(vFromAsDO);
305
vToAsVisual =
VisualTreeHelper
.GetContainingVisual2D(vTo);
System\Windows\Input\Manipulation.cs (1)
307
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
System\Windows\Input\Stylus\Common\StylusDevice.cs (2)
339
Visual visualFirstAncestor =
VisualTreeHelper
.GetContainingVisual2D(InputElement.GetContainingVisual(doRelativeTo));
340
Visual visualRoot =
VisualTreeHelper
.GetContainingVisual2D(InputElement.GetRootVisual(doRelativeTo));
System\Windows\Input\Stylus\Common\StylusPlugInCollection.cs (1)
260
Visual root =
VisualTreeHelper
.GetContainingVisual2D(InputElement.GetRootVisual(_element));
System\Windows\Input\Stylus\Common\StylusTouchDeviceBase.cs (1)
127
Visual containingVisual2D =
VisualTreeHelper
.GetContainingVisual2D(containingVisual);
System\Windows\Input\Stylus\Pointer\PointerInteractionEngine.cs (1)
479
DpiScale dpi =
VisualTreeHelper
.GetDpi(_stylusDevice.CriticalActiveSource.RootVisual);
System\Windows\Input\Stylus\Pointer\PointerStylusPlugInManager.cs (9)
84
if (
VisualTreeHelper
.IsAncestorOf(spicAddingVisual, curV))
90
if (!
VisualTreeHelper
.IsAncestorOf(spicAddingVisual, curV))
99
DependencyObject commonParent =
VisualTreeHelper
.FindCommonAncestor(spicAddingVisual, curV);
111
while (
VisualTreeHelper
.GetParentInternal(spicAddingVisual) != commonParent)
112
spicAddingVisual =
VisualTreeHelper
.GetParentInternal(spicAddingVisual);
113
while (
VisualTreeHelper
.GetParentInternal(curV) != commonParent)
114
curV =
VisualTreeHelper
.GetParentInternal(curV);
116
int count =
VisualTreeHelper
.GetChildrenCount(commonParent);
119
DependencyObject child =
VisualTreeHelper
.GetChild(commonParent, j);
System\Windows\Input\Stylus\Pointer\PointerTouchDevice.cs (1)
80
pixelsPerInch =
VisualTreeHelper
.GetDpi(ActiveSource.RootVisual).PixelsPerInchX;
System\Windows\Input\Stylus\Wisp\PenContexts.cs (9)
282
if (
VisualTreeHelper
.IsAncestorOf(spicAddingVisual, curV))
288
if (!
VisualTreeHelper
.IsAncestorOf(spicAddingVisual, curV))
297
DependencyObject commonParent =
VisualTreeHelper
.FindCommonAncestor(spicAddingVisual, curV);
309
while (
VisualTreeHelper
.GetParentInternal(spicAddingVisual) != commonParent)
310
spicAddingVisual =
VisualTreeHelper
.GetParentInternal(spicAddingVisual);
311
while (
VisualTreeHelper
.GetParentInternal(curV) != commonParent)
312
curV =
VisualTreeHelper
.GetParentInternal(curV);
314
int count =
VisualTreeHelper
.GetChildrenCount(commonParent);
317
DependencyObject child =
VisualTreeHelper
.GetChild(commonParent, j);
System\Windows\Input\TouchDevice.cs (1)
1203
currentChild =
VisualTreeHelper
.GetParent(currentChild);
System\Windows\InterOp\HwndMouseInputProvider.cs (1)
295
GeneralTransform gDown = inputSource.RootVisual.TransformToDescendant(
VisualTreeHelper
.GetContainingVisual2D(containingVisual));
System\Windows\InterOp\HwndTarget.cs (2)
1807
int childrenCount =
VisualTreeHelper
.GetChildrenCount(d);
1810
DependencyObject child =
VisualTreeHelper
.GetChild(d, i);
System\Windows\Media\BitmapCacheBrush.cs (4)
208
((
VisualTreeHelper
.GetParent(element) == null && !(element.IsRootElement)) // element is not connected to visual tree, OR
209
|| (
VisualTreeHelper
.GetParent(element) is Visual3D) // element is a 2D child of a 3D object, OR
210
|| (
VisualTreeHelper
.GetParent(element) == InternalTarget))) // element is only connected to visual tree via our wrapper Visual
263
DependencyObject parent =
VisualTreeHelper
.GetParent(element);
System\Windows\Media\Visual.cs (6)
1899
VisualTreeHelper
.HitTest(
4491
while ((
VisualTreeHelper
.GetParent(g) != null) && (g != ancestor))
4570
g =
VisualTreeHelper
.GetContainingVisual2D(gAsVisual3D);
4667
Viewport2DVisual3D containingVisual3D =
VisualTreeHelper
.GetContainingVisual3D(this) as Viewport2DVisual3D;
5097
e =
VisualTreeHelper
.GetParent(e);
5166
e =
VisualTreeHelper
.GetParent(e);
System\Windows\Media\VisualBrush.cs (3)
190
((
VisualTreeHelper
.GetParent(element) == null && !(element.IsRootElement))
191
|| (
VisualTreeHelper
.GetParent(element) is Visual3D)))
230
DependencyObject parent =
VisualTreeHelper
.GetParent(element);
System\Windows\Media\VisualCollection.cs (1)
419
Visual oldParent =
VisualTreeHelper
.GetContainingVisual2D(child._parent);
System\Windows\Media\VisualTreeHelper.cs (2)
178
reference =
VisualTreeHelper
.GetParent(reference);
197
reference =
VisualTreeHelper
.GetParent(reference);
System\Windows\Media3D\Visual3D.cs (6)
458
Debug.Assert(
VisualTreeHelper
.GetParent(this) != null, "If oldParent is null, current parent should != null.");
463
VisualTreeHelper
.GetParent(this),
804
Viewport3DVisual viewport3DVisual = (Viewport3DVisual)
VisualTreeHelper
.GetContainingVisual2D(this);
1673
while ((
VisualTreeHelper
.GetParent(g) != null) && (g != ancestor))
1685
g =
VisualTreeHelper
.GetParent(gAsVisual3D);
1702
Visual3D containing3DParent =
VisualTreeHelper
.GetContainingVisual3D(gAsVisual);
System\Windows\Navigation\BaseUriHelper.cs (1)
593
doCurrent =
VisualTreeHelper
.GetParent(vis);
System\Windows\UIElement.cs (7)
722
for(Visual v =
VisualTreeHelper
.GetParent(this) as Visual; v != null; v =
VisualTreeHelper
.GetParent(v) as Visual)
740
for(Visual v =
VisualTreeHelper
.GetParent(this) as Visual; v != null; v =
VisualTreeHelper
.GetParent(v) as Visual)
1547
if(parent != null &&
VisualTreeHelper
.IsAncestorOf(e.Ancestor, parent))
2041
VisualTreeHelper
.HitTest(this,
2114
candidate =
VisualTreeHelper
.GetParentInternal(candidate);
System\Windows\UIElement3D.cs (1)
239
if (parent != null &&
VisualTreeHelper
.IsAncestorOf(e.Ancestor, parent))
PresentationFramework (287)
MS\Internal\Annotations\Anchoring\PathNode.cs (1)
240
parent =
VisualTreeHelper
.GetParent(visual);
MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (2)
199
int count =
VisualTreeHelper
.GetChildrenCount(dpv);
201
return
VisualTreeHelper
.GetChild(dpv, 0) as DocumentPageHost;
MS\Internal\Annotations\Component\AdornerPresentationContext.cs (5)
143
Visual parent =
VisualTreeHelper
.GetParent(_adornerLayer) as Visual;
394
int count =
VisualTreeHelper
.GetChildrenCount(_adornerLayer);
400
DependencyObject child =
VisualTreeHelper
.GetChild(_adornerLayer, i);
453
int count =
VisualTreeHelper
.GetChildrenCount(adornerLayer);
459
DependencyObject child =
VisualTreeHelper
.GetChild(adornerLayer, i);
MS\Internal\Annotations\Component\AnnotationAdorner.cs (1)
175
AdornerLayer adornerLayer = (AdornerLayer)
VisualTreeHelper
.GetParent(this);
MS\Internal\Controls\InkCanvasFeedbackAdorner.cs (2)
115
UIElement parent = ((UIElement)
VisualTreeHelper
.GetParent(this)) as UIElement;
119
((UIElement)
VisualTreeHelper
.GetParent(this)).InvalidateArrange();
MS\Internal\Controls\InkCanvasInnerCanvas.cs (2)
253
HitTestResult hitTestResult =
VisualTreeHelper
.HitTest(this, point);
273
DependencyObject parent =
VisualTreeHelper
.GetParent(currentObject);
MS\Internal\Data\CommitManager.cs (1)
133
bool result = (ancestor == null) ||
VisualTreeHelper
.IsAncestorOf(ancestor, element);
MS\Internal\Data\ObjectRef.cs (3)
261
ContentPresenter cp =
VisualTreeHelper
.IsVisualType(dd) ?
VisualTreeHelper
.GetParent(dd) as ContentPresenter : null;
512
DependencyObject layout = (v != null) ?
VisualTreeHelper
.GetParent(v) : null;
MS\Internal\Documents\ContentHostHelper.cs (2)
98
if (
VisualTreeHelper
.GetChildrenCount(textView.RenderScope) > 0)
100
ich =
VisualTreeHelper
.GetChild(textView.RenderScope, 0) as IContentHost;
MS\Internal\Documents\DocumentGrid.cs (3)
1311
if (
VisualTreeHelper
.GetParent(this) != null)
2644
HitTestResult result =
VisualTreeHelper
.HitTest(this, point);
2658
currentVisual =
VisualTreeHelper
.GetParent(currentVisual);
MS\Internal\Documents\DocumentPageHost.cs (4)
51
Visual currentParent =
VisualTreeHelper
.GetParent(pageVisual) as Visual;
57
DocumentPageHost docPageHost =
VisualTreeHelper
.GetParent(pageVisualHost) as DocumentPageHost;
88
pageVisualHost =
VisualTreeHelper
.GetParent(_pageVisual) as ContainerVisual;
127
return
VisualTreeHelper
.GetParent(_pageVisual) as Visual;
MS\Internal\Documents\DocumentViewerHelper.cs (6)
342
VisualTreeHelper
.IsAncestorOf(findToolBarHost, focusedElement))
350
VisualTreeHelper
.IsAncestorOf(findToolBarHost, focusedElement))
454
Visual visual =
VisualTreeHelper
.GetParent(originalVisual) as Visual;
457
if (
VisualTreeHelper
.GetClip(visual) != null)
464
Rect rectBounds =
VisualTreeHelper
.GetClip(visual).Bounds;
474
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
MS\Internal\Documents\TextDocumentView.cs (1)
558
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
MS\Internal\Documents\UIElementIsland.cs (1)
39
Visual currentParent =
VisualTreeHelper
.GetParent(_child) as Visual;
MS\Internal\FrameworkObject.cs (7)
311
fo.Reset(
VisualTreeHelper
.GetParent(visual));
319
fo.Reset(
VisualTreeHelper
.GetParent(visual3D));
404
parent =
VisualTreeHelper
.GetParent(_fe);
418
parent =
VisualTreeHelper
.GetParent(visual);
426
parent =
VisualTreeHelper
.GetParent(visual3D);
865
visualParent =
VisualTreeHelper
.GetParent(_fe);
874
visualParent = (visual != null) ?
VisualTreeHelper
.GetParent(visual) : null;
MS\Internal\Helper.cs (13)
447
parent =
VisualTreeHelper
.GetParent(v);
520
UIElement child = (
VisualTreeHelper
.GetChildrenCount(element) > 0) ?
VisualTreeHelper
.GetChild(element, 0) as UIElement : null;
537
UIElement child = (
VisualTreeHelper
.GetChildrenCount(element) > 0) ?
VisualTreeHelper
.GetChild(element, 0) as UIElement : null;
1273
int count =
VisualTreeHelper
.GetChildrenCount(searchStart);
1276
descendant =
VisualTreeHelper
.GetChild(searchStart, i) as FrameworkElement;
1301
element =
VisualTreeHelper
.GetParent(element);
1333
Debug.Assert(
VisualTreeHelper
.IsAncestorOf(pathEndElement, pathStartElement), "pathEndElement should be an ancestor of pathStartElement");
1370
element =
VisualTreeHelper
.GetParent(element);
1393
int childrenCount =
VisualTreeHelper
.GetChildrenCount(d);
1396
DependencyObject child =
VisualTreeHelper
.GetChild(d, i);
1447
parent =
VisualTreeHelper
.GetParent(element);
MS\Internal\Ink\InkCanvasSelection.cs (3)
141
Debug.Assert(
VisualTreeHelper
.GetParent(feedbackAdorner) == null,
156
Debug.Assert(
VisualTreeHelper
.GetParent(_inkCanvas.FeedbackAdorner)
174
Debug.Assert(
VisualTreeHelper
.GetParent(feedbackAdorner) == adornerLayer,
MS\Internal\LayoutDump.cs (6)
215
Geometry clip =
VisualTreeHelper
.GetClip(visual);
247
Geometry clip =
VisualTreeHelper
.GetClip(element);
334
int count =
VisualTreeHelper
.GetChildrenCount(visualParent);
419
int count =
VisualTreeHelper
.GetChildrenCount(visual);
834
int count1 =
VisualTreeHelper
.GetChildrenCount(visual);
838
int count2 =
VisualTreeHelper
.GetChildrenCount(rowVisual);
MS\Internal\PtsHost\Line.cs (1)
419
Visual currentParent =
VisualTreeHelper
.GetParent(inlineObject.UIElementIsland) as Visual;
MS\Internal\PtsHost\PtsHelper.cs (1)
268
Visual currentParent =
VisualTreeHelper
.GetParent(paraClient.Visual) as Visual;
MS\Internal\PtsHost\TableParaClient.cs (4)
1573
||
VisualTreeHelper
.GetParent(cellParaClient.Visual) == null )
1575
Visual currentParent =
VisualTreeHelper
.GetParent(cellParaClient.Visual) as Visual;
1589
&&
VisualTreeHelper
.GetParent(cellParaClient.Visual) != null );
1718
&&
VisualTreeHelper
.GetParent(cellParaClient.Visual) != null );
MS\Internal\PtsHost\TextParaClient.cs (7)
2267
int count =
VisualTreeHelper
.GetChildrenCount(Visual);
2280
visual =
VisualTreeHelper
.GetChild(Visual, visualIndex) as LineVisual;
2282
Invariant.Assert(visual != null ||
VisualTreeHelper
.GetChild(Visual, visualIndex) == null);
2297
int count =
VisualTreeHelper
.GetChildrenCount(Visual);
2303
if(
VisualTreeHelper
.GetChild(Visual, visualIndex) is ParagraphElementVisual)
2309
visual =
VisualTreeHelper
.GetChild(temp, visualIndex) as LineVisual;
2311
Invariant.Assert(visual != null ||
VisualTreeHelper
.GetChild(temp, visualIndex) == null);
MS\Internal\PtsHost\UIElementParaClient.cs (1)
114
Visual currentParent =
VisualTreeHelper
.GetParent(uiElementIsland) as Visual;
MS\Internal\Text\ComplexLine.cs (1)
167
Visual currentParent =
VisualTreeHelper
.GetParent(inlineObject.Element) as Visual;
System\Windows\Annotations\AnnotationDocumentPaginator.cs (2)
392
Invariant.Assert(
VisualTreeHelper
.GetChildrenCount(dpv) == 1, "DocumentPageView has no visual children.");
393
DependencyObject firstElement =
VisualTreeHelper
.GetChild(dpv, 0);
System\Windows\Automation\Peers\DocumentAutomationPeer.cs (3)
247
if (
VisualTreeHelper
.GetClip(visual) != null)
254
Rect clipBounds =
VisualTreeHelper
.GetClip(visual).Bounds;
264
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
System\Windows\Automation\Peers\TextElementAutomationPeer.cs (3)
176
if (
VisualTreeHelper
.GetClip(visual) != null)
184
Rect rectBounds =
VisualTreeHelper
.GetClip(visual).Bounds;
196
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
System\Windows\Automation\Peers\TreeViewItemAutomationPeer.cs (2)
83
int count =
VisualTreeHelper
.GetChildrenCount(parent);
86
DependencyObject child =
VisualTreeHelper
.GetChild(parent, i);
System\Windows\BroadcastEventHelper.cs (6)
481
visual =
VisualTreeHelper
.GetContainingVisual2D(visual3D);
583
int count =
VisualTreeHelper
.GetChildrenCount(v);
587
FrameworkElement child =
VisualTreeHelper
.GetChild(v, i) as FrameworkElement;
632
DependencyObject coreParent = (fo.IsFE) ?
VisualTreeHelper
.GetParent(fo.FE) : null;
696
coreParent =
VisualTreeHelper
.GetParent(v);
704
coreParent =
VisualTreeHelper
.GetParent(v3D);
System\Windows\Controls\AdornedElementPlaceholder.cs (1)
225
_templatedAdorner =
VisualTreeHelper
.GetParent(templateParent) as TemplatedAdorner;
System\Windows\Controls\Canvas.cs (1)
190
Canvas p =
VisualTreeHelper
.GetParent(uie) as Canvas;
System\Windows\Controls\ComboBox.cs (4)
230
if (comboBox._clonedElement != null &&
VisualTreeHelper
.GetParent(comboBox._clonedElement) == null)
922
DependencyObject parent =
VisualTreeHelper
.GetParent(_clonedElement);
1606
int count =
VisualTreeHelper
.GetChildrenCount(visual);
1609
strValue += ExtractString((DependencyObject)(
VisualTreeHelper
.GetChild(visual, i)));
System\Windows\Controls\DataGrid.cs (3)
6386
sourceElement =
VisualTreeHelper
.GetParent(sourceElement) as UIElement;
6618
element =
VisualTreeHelper
.GetParent(row) as UIElement;
6639
element =
VisualTreeHelper
.GetParent(cell) as UIElement;
System\Windows\Controls\DataGridCellsPanel.cs (4)
83
UIElement parent =
VisualTreeHelper
.GetParent(this) as UIElement;
711
if (isRecycled &&
VisualTreeHelper
.GetParent(container) != null)
733
if (isRecycled &&
VisualTreeHelper
.GetParent(container) != null)
1857
return
VisualTreeHelper
.GetParent(row) as DataGridRowsPresenter;
System\Windows\Controls\DataGridColumnFloatingHeader.cs (1)
144
Vector offset =
VisualTreeHelper
.GetOffset(_referenceHeader);
System\Windows\Controls\DataGridHelper.cs (6)
179
parent =
VisualTreeHelper
.GetParent(parent) as UIElement;
213
int childCount =
VisualTreeHelper
.GetChildrenCount(element);
216
DependencyObject child =
VisualTreeHelper
.GetChild(element, i) as DependencyObject;
304
return
VisualTreeHelper
.GetParent(element) as DataGridCellsPanel;
568
return
VisualTreeHelper
.IsAncestorOf(element, contextElement, typeof(T));
661
VisualTreeHelper
.IsAncestorOf(cell, targetElement, typeof(DataGridCell)))
System\Windows\Controls\DockPanel.cs (1)
124
DockPanel p =
VisualTreeHelper
.GetParent(uie) as DockPanel;
System\Windows\Controls\FlowDocumentScrollViewer.cs (2)
1294
if (RenderScope != null &&
VisualTreeHelper
.GetChildrenCount(RenderScope) > 0)
1296
ich =
VisualTreeHelper
.GetChild(RenderScope, 0) as IContentHost;
System\Windows\Controls\Grid.cs (2)
2980
Grid grid =
VisualTreeHelper
.GetParent(child) as Grid;
3992
Grid grid =
VisualTreeHelper
.GetParent(this) as Grid;
System\Windows\Controls\GridSplitter.cs (1)
475
AdornerLayer layer =
VisualTreeHelper
.GetParent(_resizeData.Adorner) as AdornerLayer;
System\Windows\Controls\GridViewColumnHeader.cs (1)
845
Vector offsetVector =
VisualTreeHelper
.GetOffset(FloatSourceHeader);
System\Windows\Controls\GridViewHeaderRowPresenter.cs (1)
924
Visual parent =
VisualTreeHelper
.GetParent(headerAsVisual) as Visual;
System\Windows\Controls\GroupItem.cs (2)
372
parent =
VisualTreeHelper
.GetParent(parent);
388
DependencyObject parentPanel =
VisualTreeHelper
.GetParent(this);
System\Windows\Controls\InkCanvas.cs (1)
555
InkCanvasInnerCanvas p =
VisualTreeHelper
.GetParent(uie) as InkCanvasInnerCanvas;
System\Windows\Controls\ItemContainerGenerator.cs (2)
2727
DependencyObject parent =
VisualTreeHelper
.GetParentInternal(container);
2739
if (parent == null ||
VisualTreeHelper
.GetParentInternal(container) != parent)
System\Windows\Controls\ItemsControl.cs (8)
1176
ui =
VisualTreeHelper
.GetParent(ui) as UIElement;
1331
Visual parent =
VisualTreeHelper
.GetParent(visual) as Visual;
1992
DependencyObject startingParent =
VisualTreeHelper
.GetParent(startingElement);
2002
startingParent =
VisualTreeHelper
.GetParent(startingParent);
3095
Visual parent =
VisualTreeHelper
.GetParent(element) as Visual;
3319
for (DependencyObject current = _itemsHost; current != this && current != null; current =
VisualTreeHelper
.GetParent(current))
3422
element =
VisualTreeHelper
.GetParent(element) as FrameworkElement;
3451
element =
VisualTreeHelper
.GetParent(element) as FrameworkElement;
System\Windows\Controls\ItemsPresenter.cs (4)
46
if (panel == null ||
VisualTreeHelper
.GetChildrenCount(panel) > 0)
177
Visual parent =
VisualTreeHelper
.GetParent(groupItem) as Visual;
181
return
VisualTreeHelper
.GetParent(parent) as ItemsPresenter;
286
ScrollContentPresenter scp =
VisualTreeHelper
.GetParent(this) as ScrollContentPresenter;
System\Windows\Controls\ListBoxItem.cs (1)
332
if (
VisualTreeHelper
.GetParent(this) == null)
System\Windows\Controls\MenuItem.cs (2)
2131
DependencyObject newParent =
VisualTreeHelper
.GetParentInternal(this);
2309
owner =
VisualTreeHelper
.GetParent(this) as ItemsControl;
System\Windows\Controls\Page.cs (1)
646
Visual visualParent =
VisualTreeHelper
.GetParent(this) as Visual;
System\Windows\Controls\PopupControlService.cs (1)
1096
return
VisualTreeHelper
.GetParent(v);
System\Windows\Controls\Primitives\BulletDecorator.cs (8)
386
if (
VisualTreeHelper
.GetChildrenCount(cp) == 1)
388
DependencyObject child =
VisualTreeHelper
.GetChild(cp, 0);
396
VisualTreeHelper
.GetChildrenCount(accessText) == 1)
399
textBlock =
VisualTreeHelper
.GetChild(accessText, 0) as TextBlock;
409
VisualTreeHelper
.GetChildrenCount(accessText) == 1)
412
return
VisualTreeHelper
.GetChild(accessText, 0) as TextBlock;
427
if(
VisualTreeHelper
.GetChildrenCount(cp) == 1)
428
return
VisualTreeHelper
.GetChild(cp, 0) as FlowDocumentScrollViewer;
System\Windows\Controls\Primitives\ButtonBase.cs (1)
85
return focusScope == null ||
VisualTreeHelper
.GetParent(focusScope) == null;
System\Windows\Controls\Primitives\DataGridColumnHeadersPresenter.cs (2)
140
UIElement child = (
VisualTreeHelper
.GetChildrenCount(this) > 0) ?
VisualTreeHelper
.GetChild(this, 0) as UIElement : null;
System\Windows\Controls\Primitives\DataGridDetailsPresenter.cs (2)
142
var childrenCount =
VisualTreeHelper
.GetChildrenCount(this);
145
return
VisualTreeHelper
.GetChild(this, 0) as FrameworkElement;
System\Windows\Controls\Primitives\DocumentPageView.cs (2)
921
visualParent =
VisualTreeHelper
.GetParent(this) as Visual;
929
visualParent =
VisualTreeHelper
.GetParent(visualParent) as Visual;
System\Windows\Controls\Primitives\DocumentViewerBase.cs (1)
1168
if (
VisualTreeHelper
.IsAncestorOf(this, targetObject))
System\Windows\Controls\Primitives\Popup.cs (11)
249
if (newValue == null &&
VisualTreeHelper
.GetParent(this) == null)
257
if (
VisualTreeHelper
.GetParent(this) == null)
312
if (!popup.IsLoaded &&
VisualTreeHelper
.GetParent(popup) != null)
720
parent =
VisualTreeHelper
.GetParent(parent);
898
if ((currentParent =
VisualTreeHelper
.GetParent(child)) != null)
971
if (logicalParent == null &&
VisualTreeHelper
.GetParent(element) != null)
1416
while ((parent =
VisualTreeHelper
.GetParent(root)) != null)
1430
targetVisual =
VisualTreeHelper
.GetContainingVisual2D(
VisualTreeHelper
.GetParent(this));
1806
DependencyObject parent =
VisualTreeHelper
.GetParent(this);
3278
dependencyObject =
VisualTreeHelper
.GetParent(dependencyObject);
System\Windows\Controls\Primitives\ScrollContentPresenter.cs (2)
748
int count =
VisualTreeHelper
.GetChildrenCount(itemsPresenter);
750
si =
VisualTreeHelper
.GetChild(itemsPresenter, 0) as IScrollInfo;
System\Windows\Controls\Primitives\TextBoxBase.cs (1)
1676
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
System\Windows\Controls\Primitives\ToolBarPanel.cs (2)
74
DependencyObject visualParent =
VisualTreeHelper
.GetParent(child);
430
DependencyObject visualParent =
VisualTreeHelper
.GetParent(child);
System\Windows\Controls\Stack.cs (2)
849
DependencyObject parent =
VisualTreeHelper
.GetParent(child);
854
parent =
VisualTreeHelper
.GetParent(dependencyObjectChild);
System\Windows\Controls\StickyNote.cs (1)
977
FrameworkElement parent =
VisualTreeHelper
.GetParent(Content.InnerControl) as FrameworkElement;
System\Windows\Controls\TabControl.cs (1)
555
FrameworkElement visualParent =
VisualTreeHelper
.GetParent(tabItem) as FrameworkElement;
System\Windows\Controls\TextAdaptor.cs (5)
262
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
345
Visual visual =
VisualTreeHelper
.GetParent(textView.RenderScope) as Visual;
349
if (
VisualTreeHelper
.GetClip(visual) != null)
356
Rect rectBounds =
VisualTreeHelper
.GetClip(visual).Bounds;
366
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
System\Windows\Controls\ToolBar.cs (4)
641
Panel itemsHost =
VisualTreeHelper
.GetParent(currentFocusElement) as Panel;
648
newFocusElement =
VisualTreeHelper
.GetChild(itemsHost, 0) as UIElement;
651
newFocusElement =
VisualTreeHelper
.GetChild(itemsHost,
VisualTreeHelper
.GetChildrenCount(itemsHost)-1) as UIElement;
System\Windows\Controls\TreeView.cs (1)
829
return
VisualTreeHelper
.GetParent(v);
System\Windows\Controls\TreeViewItem.cs (5)
478
if (
VisualTreeHelper
.GetParent(this) != null)
835
FrameworkElement parent =
VisualTreeHelper
.GetParent(toggleButton) as FrameworkElement;
838
int count =
VisualTreeHelper
.GetChildrenCount(parent);
841
if (
VisualTreeHelper
.GetChild(parent, index) == toggleButton)
843
header =
VisualTreeHelper
.GetChild(parent, index+1) as FrameworkElement;
System\Windows\Controls\VirtualizingPanel.cs (1)
349
ItemsPresenter itemsPresenter =
VisualTreeHelper
.GetParent(p) as ItemsPresenter;
System\Windows\Controls\VirtualizingStackPanel.cs (15)
834
if (itemsControl == null || !
VisualTreeHelper
.IsAncestorOf(this, _scrollData._firstContainerInViewport))
1094
DependencyObject parent =
VisualTreeHelper
.GetParent(element);
3118
Panel parentPanel = (itemsOwner != null) ?
VisualTreeHelper
.GetParent(itemsOwner) as Panel : null;
3746
VirtualizingPanel vp =
VisualTreeHelper
.GetParent(itemsOwner) as VirtualizingPanel;
4100
VirtualizingPanel virtualizingPanel =
VisualTreeHelper
.GetParent(element) as VirtualizingPanel;
4182
parentItemsControl = ItemsControl.GetItemsOwnerInternal(
VisualTreeHelper
.GetParent(itemsControl)) as ItemsControl;
4200
ItemsControl.GetItemsOwnerInternal(
VisualTreeHelper
.GetParent(itemsOwner)) as IContainItemStorage;
6578
parent =
VisualTreeHelper
.GetParent(parent);
11034
DependencyObject element =
VisualTreeHelper
.GetParent(child);
11108
ItemsControl.GetItemsOwnerInternal(
VisualTreeHelper
.GetParent((Visual)itemStorageProvider)) as IContainItemStorage;
11125
element =
VisualTreeHelper
.GetParent(element);
11141
DependencyObject parent =
VisualTreeHelper
.GetParent(child);
11149
parent =
VisualTreeHelper
.GetParent(child);
12177
VirtualizingStackPanel parent =
VisualTreeHelper
.GetParent(itemsOwner) as VirtualizingStackPanel;
13047
VirtualizingStackPanel vsp =
VisualTreeHelper
.GetParent(container) as VirtualizingStackPanel;
System\Windows\DescendentsWalker.cs (3)
263
if (
VisualTreeHelper
.GetParent(fe) != fe.Parent)
320
if (
VisualTreeHelper
.GetParent(child) != fe.Parent)
373
DependencyObject dependencyObjectParent =
VisualTreeHelper
.GetParent(fe);
System\Windows\DescendentsWalkerBase.cs (1)
41
DependencyObject dependencyObjectParent =
VisualTreeHelper
.GetParent(fe);
System\Windows\Documents\AdornerDecorator.cs (2)
121
if (
VisualTreeHelper
.GetParent(_adornerLayer) != null)
140
if (
VisualTreeHelper
.GetParent(_adornerLayer) != null)
System\Windows\Documents\AdornerLayer.cs (9)
279
PointHitTestResult result = VisualTreeUtils.AsNearestPointHitTestResult(
VisualTreeHelper
.HitTest(this, point, false));
292
visual = (Visual)
VisualTreeHelper
.GetParent(visual);
312
Visual parent =
VisualTreeHelper
.GetParent(visual) as Visual;
321
parent =
VisualTreeHelper
.GetParent(parent) as Visual;
702
Visual adornerLayerParent =
VisualTreeHelper
.GetParent(this) as Visual;
764
Visual adornerLayerParent =
VisualTreeHelper
.GetParent(this) as Visual;
824
Visual adornerLayerParent =
VisualTreeHelper
.GetParent(this) as Visual;
841
Geometry geometry =
VisualTreeHelper
.GetClip(element);
860
element = (Visual)
VisualTreeHelper
.GetParent(element);
System\windows\Documents\CaretElement.cs (1)
847
node =
VisualTreeHelper
.GetParent(node);
System\Windows\Documents\ColumnResizeAdorner.cs (1)
121
adornerLayer =
VisualTreeHelper
.GetParent(this) as AdornerLayer;
System\Windows\Documents\CompositionAdorner.cs (2)
127
Visual parent2d =
VisualTreeHelper
.GetParent(this.AdornedElement) as Visual;
348
AdornerLayer adornerLayer =
VisualTreeHelper
.GetParent(this) as AdornerLayer;
System\Windows\Documents\DocumentSequenceTextView.cs (1)
497
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
System\Windows\Documents\FixedTextView.cs (3)
684
visual =
VisualTreeHelper
.GetParent(visual) as Visual;
772
HitTestResult result =
VisualTreeHelper
.HitTest(this.FixedPage, pt);
784
v =
VisualTreeHelper
.GetParent(v);
System\Windows\Documents\FlowDocument.cs (1)
911
parentOfEmbeddedElement =
VisualTreeHelper
.GetParent((Visual)element);
System\Windows\Documents\RubberbandSelector.cs (8)
226
visual.Clip =
VisualTreeHelper
.GetClip(old);
227
visual.Offset =
VisualTreeHelper
.GetOffset(old);
228
visual.Transform =
VisualTreeHelper
.GetTransform(old);
229
visual.Opacity =
VisualTreeHelper
.GetOpacity(old);
230
visual.OpacityMask =
VisualTreeHelper
.GetOpacityMask(old);
233
visual.BitmapEffectInput =
VisualTreeHelper
.GetBitmapEffectInput(old);
234
visual.BitmapEffect =
VisualTreeHelper
.GetBitmapEffect(old);
243
int count =
VisualTreeHelper
.GetChildrenCount(old);
System\windows\Documents\TextEditorContextMenu.cs (2)
284
for (Visual visual = This.UiScope; visual != null; visual =
VisualTreeHelper
.GetParent(visual) as Visual)
339
Geometry clip =
VisualTreeHelper
.GetClip(element);
System\windows\Documents\TextEditorMouse.cs (4)
607
Visual scrollViewer =
VisualTreeHelper
.GetParent(This.UiScope) as Visual;
610
scrollViewer =
VisualTreeHelper
.GetParent(scrollViewer) as Visual;
764
HitTestResult hitTestResult =
VisualTreeHelper
.HitTest(textEditor.UiScope, point);
796
hitElement =
VisualTreeHelper
.GetParent(hitElement);
System\windows\Documents\TextSelection.cs (3)
2465
element =
VisualTreeHelper
.GetParent(element);
2583
parent =
VisualTreeHelper
.GetParent(element);
2589
parent =
VisualTreeHelper
.GetParent(element);
System\Windows\FrameworkElement.cs (12)
2214
for (Visual v =
VisualTreeHelper
.GetParent(this) as Visual;
2216
v =
VisualTreeHelper
.GetParent(v) as Visual)
2457
DependencyObject newParent =
VisualTreeHelper
.GetParentInternal(this);
2537
FrameworkElement.GetContainingFrameworkElement(
VisualTreeHelper
.GetParent(this), out feParent, out fceParent);
2546
if(feParent == null || !
VisualTreeHelper
.IsAncestorOf(e.Ancestor, feParent))
2549
BroadcastEventHelper.AddOrRemoveHasLoadedChangeHandlerFlag(this, null,
VisualTreeHelper
.GetParent(e.Ancestor));
2552
BroadcastEventHelper.BroadcastLoadedOrUnloadedEvent(this, null,
VisualTreeHelper
.GetParent(e.Ancestor));
2891
DependencyObject visualParent =
VisualTreeHelper
.GetParent(this);
3106
DependencyObject visualParent =
VisualTreeHelper
.GetParent(this);
3969
DependencyObject parentVisual =
VisualTreeHelper
.GetParent(fe);
4005
for (DependencyObject v = visual; v != null; v =
VisualTreeHelper
.GetParent(v))
5535
fe._parent == null &&
VisualTreeHelper
.GetParent(fe) == null &&
System\Windows\Generated\FrameworkElement.cs (2)
706
parent =
VisualTreeHelper
.GetParent(this);
740
parent =
VisualTreeHelper
.GetParent(this);
System\Windows\Input\KeyboardNavigation.cs (14)
670
if (_adornedContentElement != null && (_contentHostParent==null ||
VisualTreeHelper
.GetParent(_contentHostParent as Visual) == null))
782
visualParent =
VisualTreeHelper
.GetParent(visualParent) as Visual;
802
AdornerLayer adornerlayer =
VisualTreeHelper
.GetParent(_focusVisualAdornerCache) as AdornerLayer;
1488
int count =
VisualTreeHelper
.GetChildrenCount(parentAsUIElement);
1492
DependencyObject vchild =
VisualTreeHelper
.GetChild(parentAsUIElement, i);
1549
int count =
VisualTreeHelper
.GetChildrenCount(parentAsUIElement);
1554
DependencyObject vchild =
VisualTreeHelper
.GetChild(parentAsUIElement, i);
1561
DependencyObject visual =
VisualTreeHelper
.GetChild(parentAsUIElement, i);
1662
int count =
VisualTreeHelper
.GetChildrenCount(elementAsVisual);
1665
DependencyObject visual =
VisualTreeHelper
.GetChild(elementAsVisual, i);
1727
int count =
VisualTreeHelper
.GetChildrenCount(elementAsVisual);
1730
DependencyObject visual =
VisualTreeHelper
.GetChild(elementAsVisual, i);
1753
while ((visual =
VisualTreeHelper
.GetParent(visual)) != null)
2434
Visual containingVisual2D =
VisualTreeHelper
.GetContainingVisual2D(uiElement3D);
System\Windows\Shell\WindowChromeWorker.cs (3)
292
if (
VisualTreeHelper
.GetChildrenCount(_window) == 0)
302
FrameworkElement rootElement = (FrameworkElement)
VisualTreeHelper
.GetChild(_window, 0);
1131
FrameworkElement rootElement = (FrameworkElement)
VisualTreeHelper
.GetChild(_window, 0);
System\Windows\StyleHelper.cs (2)
1962
FrameworkElement parent =
VisualTreeHelper
.GetParent(child) as FrameworkElement;
1971
Debug.Assert( null ==
VisualTreeHelper
.GetParent(child),
System\Windows\TreeWalkHelper.cs (1)
1015
DependencyObject visualParent =
VisualTreeHelper
.GetParent(d);
System\Windows\Window.cs (1)
1796
if (
VisualTreeHelper
.GetParent(this) != null )
ReachFramework (21)
AlphaFlattener\BrushProxy.cs (4)
3026
Rect visualBounds =
VisualTreeHelper
.GetDescendantBounds(visual);
3028
Geometry visualClip =
VisualTreeHelper
.GetClip(visual);
3121
Rect visualBounds =
VisualTreeHelper
.GetDescendantBounds(vb.Visual);
3123
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)
363
Rect bounds =
VisualTreeHelper
.GetContentBounds(visual);
364
bounds.Union(
VisualTreeHelper
.GetDescendantBounds(visual));
Serialization\Manager\ReachVisualSerializer.cs (2)
241
if (index <
VisualTreeHelper
.GetChildrenCount(nodeVisual))
245
child = (Visual)
VisualTreeHelper
.GetChild(nodeVisual, index);
Serialization\VisualTreeFlattener.cs (9)
434
System.Windows.Media.Drawing content =
VisualTreeHelper
.GetDrawing(visual);
438
if ((
VisualTreeHelper
.GetChildrenCount(visual) == 0) && (Complexity(content) <= 1))
445
Brush mask =
VisualTreeHelper
.GetOpacityMask(visual);
446
double opacity =
VisualTreeHelper
.GetOpacity(visual);
447
Effect effect =
VisualTreeHelper
.GetEffect(visual);
448
Geometry clip =
VisualTreeHelper
.GetClip(visual);
451
Rect bounds =
VisualTreeHelper
.GetDescendantBounds(visual);
645
int count =
VisualTreeHelper
.GetChildrenCount(visual);
650
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)
1310
Visual parent =
VisualTreeHelper
.GetParent(visual) as Visual;
1338
parent =
VisualTreeHelper
.GetParent(parent) as Visual;
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonQuickAccessToolBarPanel.cs (1)
248
UIElement parent =
VisualTreeHelper
.GetParent(this) as UIElement;
Microsoft\Windows\Controls\Ribbon\RibbonComboBox.cs (3)
565
DependencyObject parent =
VisualTreeHelper
.GetParent(_clonedElement);
855
int count =
VisualTreeHelper
.GetChildrenCount(visual);
858
strValue += ExtractString((DependencyObject)(
VisualTreeHelper
.GetChild(visual, i)));
Microsoft\Windows\Controls\Ribbon\RibbonContentPresenter.cs (2)
110
if (
VisualTreeHelper
.GetChildrenCount(this) > 0)
112
_templateRoot =
VisualTreeHelper
.GetChild(this, 0) as FrameworkElement;
Microsoft\Windows\Controls\Ribbon\RibbonControl.cs (2)
210
if (
VisualTreeHelper
.GetChildrenCount(_partContentPresenter) > 0 &&
211
VisualTreeHelper
.GetChild(_partContentPresenter, 0) is RibbonGroup)
Microsoft\Windows\Controls\Ribbon\RibbonGroup.cs (1)
208
RibbonGroupsPanel groupsPanel =
VisualTreeHelper
.GetParent(this) as RibbonGroupsPanel;
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (2)
2948
int childCount =
VisualTreeHelper
.GetChildrenCount(element);
2952
DependencyObject child =
VisualTreeHelper
.GetChild(element, i);
Microsoft\Windows\Controls\Ribbon\RibbonSeparator.cs (1)
107
DependencyObject newParent =
VisualTreeHelper
.GetParent(this);
Microsoft\Windows\Controls\Ribbon\RibbonTabHeader.cs (1)
524
Panel parentPanel =
VisualTreeHelper
.GetParent(this) as Panel;
Microsoft\Windows\Controls\Ribbon\RibbonToolTip.cs (4)
297
DependencyObject visualParent =
VisualTreeHelper
.GetParent(element);
320
(
VisualTreeHelper
.GetChildrenCount(ribbonGroup) > 0 && toolTip.PlacementTarget ==
VisualTreeHelper
.GetChild(ribbonGroup, 0)));
362
element =
VisualTreeHelper
.GetParent(element);
WindowsFormsIntegration (8)
System\Windows\Integration\ElementHost.cs (2)
686
int childCount =
VisualTreeHelper
.GetChildrenCount(element);
690
SetChildElementsIsImeEnabled(
VisualTreeHelper
.GetChild(element, childIndex), isEnabled);
System\Windows\Integration\HostUtils.cs (3)
91
current =
VisualTreeHelper
.GetParent(current);
215
current =
VisualTreeHelper
.GetParent(current);
432
currentObject =
VisualTreeHelper
.GetParent(currentObject);
System\Windows\Integration\WindowsFormsHost.cs (2)
164
{ element =
VisualTreeHelper
.GetParent(element); }
402
DependencyObject parentElement =
VisualTreeHelper
.GetParent(frameworkElement);
System\Windows\Integration\WindowsFormsHostPropertyMap.cs (1)
68
parent =
VisualTreeHelper
.GetParent(parent);