// Token: 0x06006502 RID: 25858 RVA: 0x001C5614 File Offset: 0x001C3814 internal static void DumpDocumentPage(XmlTextWriter writer, DocumentPage page, Visual parent) { writer.WriteStartElement("DocumentPage"); writer.WriteAttributeString("Type", page.GetType().FullName); if (page != DocumentPage.Missing) { LayoutDump.DumpSize(writer, "Size", page.Size); GeneralTransform generalTransform = page.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); } Type type = page.GetType(); LayoutDump.DumpCustomDocumentPage dumpCustomDocumentPage = null; while (dumpCustomDocumentPage == null && type != null) { dumpCustomDocumentPage = (LayoutDump._documentPageToDumpHandler[type] as LayoutDump.DumpCustomDocumentPage); type = type.BaseType; } if (dumpCustomDocumentPage != null) { dumpCustomDocumentPage(writer, page); } } writer.WriteEndElement(); }
// Token: 0x0600650D RID: 25869 RVA: 0x001C5B40 File Offset: 0x001C3D40 private static bool DumpFlowDocumentView(XmlTextWriter writer, UIElement element, bool uiElementsOnly) { FlowDocumentView flowDocumentView = element as FlowDocumentView; IScrollInfo scrollInfo = flowDocumentView; if (scrollInfo.ScrollOwner != null) { Size size = new Size(scrollInfo.ExtentWidth, scrollInfo.ExtentHeight); if (DoubleUtil.AreClose(size, element.DesiredSize)) { LayoutDump.DumpSize(writer, "Extent", size); } Point point = new Point(scrollInfo.HorizontalOffset, scrollInfo.VerticalOffset); if (!DoubleUtil.IsZero(point.X) || !DoubleUtil.IsZero(point.Y)) { LayoutDump.DumpPoint(writer, "Offset", point); } } FlowDocumentPage documentPage = flowDocumentView.Document.BottomlessFormatter.DocumentPage; GeneralTransform generalTransform = documentPage.Visual.TransformToAncestor(flowDocumentView); Point point2 = new Point(0.0, 0.0); generalTransform.TryTransform(point2, out point2); if (!DoubleUtil.IsZero(point2.X) && !DoubleUtil.IsZero(point2.Y)) { LayoutDump.DumpPoint(writer, "PagePosition", point2); } LayoutDump.DumpFlowDocumentPage(writer, documentPage); return(false); }
// 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(); }