// Token: 0x06006500 RID: 25856 RVA: 0x001C5414 File Offset: 0x001C3614 internal static void DumpVisual(XmlTextWriter writer, Visual visual, Visual parent) { if (visual is UIElement) { LayoutDump.DumpUIElement(writer, (UIElement)visual, parent, false); return; } writer.WriteStartElement(visual.GetType().Name); Rect visualContentBounds = visual.VisualContentBounds; if (!visualContentBounds.IsEmpty) { LayoutDump.DumpRect(writer, "ContentRect", visualContentBounds); } Geometry clip = VisualTreeHelper.GetClip(visual); if (clip != null) { LayoutDump.DumpRect(writer, "Clip.Bounds", clip.Bounds); } GeneralTransform generalTransform = visual.TransformToAncestor(parent); Point point = new Point(0.0, 0.0); generalTransform.TryTransform(point, out point); if (point.X != 0.0 || point.Y != 0.0) { LayoutDump.DumpPoint(writer, "Position", point); } LayoutDump.DumpVisualChildren(writer, "Children", visual); writer.WriteEndElement(); }
// Token: 0x06006501 RID: 25857 RVA: 0x001C54F0 File Offset: 0x001C36F0 private static void DumpUIElement(XmlTextWriter writer, UIElement element, Visual parent, bool uiElementsOnly) { writer.WriteStartElement(element.GetType().Name); LayoutDump.DumpSize(writer, "DesiredSize", element.DesiredSize); LayoutDump.DumpSize(writer, "ComputedSize", element.RenderSize); Geometry clip = VisualTreeHelper.GetClip(element); if (clip != null) { LayoutDump.DumpRect(writer, "Clip.Bounds", clip.Bounds); } GeneralTransform generalTransform = element.TransformToAncestor(parent); Point point = new Point(0.0, 0.0); generalTransform.TryTransform(point, out point); if (point.X != 0.0 || point.Y != 0.0) { LayoutDump.DumpPoint(writer, "Position", point); } bool flag = false; Type type = element.GetType(); LayoutDump.DumpCustomUIElement dumpCustomUIElement = null; while (dumpCustomUIElement == null && type != null) { dumpCustomUIElement = (LayoutDump._elementToDumpHandler[type] as LayoutDump.DumpCustomUIElement); type = type.BaseType; } if (dumpCustomUIElement != null) { flag = dumpCustomUIElement(writer, element, uiElementsOnly); } if (!flag) { if (uiElementsOnly) { LayoutDump.DumpUIElementChildren(writer, "Children", element); } else { LayoutDump.DumpVisualChildren(writer, "Children", element); } } writer.WriteEndElement(); }