コード例 #1
0
        // 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);
        }