/// <summary>
        /// Applies the result of the multipage layout using a <see cref="MultiPageIGraphBuilder"/>.
        /// </summary>
        private void ApplyLayoutResult(MultiPageLayoutResult multiPageLayout, double pageWidth, double pageHeight)
        {
            // decorations for underlined labels
            var decorations = new TextDecorationCollection
            {
                new TextDecoration(TextDecorationLocation.Underline, Pens.Black, 0, TextDecorationUnit.FontRecommended, TextDecorationUnit.FontRecommended)
            };

            // use the MultiPageGraphBuilder to create a list of IGraph instances that represent the single pages
            MultiPageIGraphBuilder builder = new MultiPageIGraphBuilder(multiPageLayout)
            {
                // assign custom template node styles for the auxiliary nodes introduced by the multipage layout.
                // also set the label style and model parameter.
                // if nothing is specified, the values of the original graph are copied.
                NormalNodeDefaults =
                {
                    Style  = new NodeControlNodeStyle("NormalNodeTemplate"),
                    Labels = { Style = new DefaultLabelStyle(),             LayoutParameter= InteriorLabelModel.Center }
                },
                ConnectorNodeDefaults =
                {
                    Style  = new NodeControlNodeStyle("ConnectorNodeTemplate"),
                    Labels = { Style = new DefaultLabelStyle {
                                   TextDecorations           = decorations
                               }, LayoutParameter            = InteriorLabelModel.Center }
                },
                ProxyNodeDefaults =
                {
                    Style  = new NodeControlNodeStyle("ProxyNodeTemplate"),
                    Labels = { Style = new DefaultLabelStyle {
                                   TextDecorations           = decorations
                               }, LayoutParameter            = InteriorLabelModel.Center }
                },
                ProxyReferenceNodeDefaults =
                {
                    Style  = new NodeControlNodeStyle("ProxyReferenceNodeTemplate"),
                    Labels = { Style = new DefaultLabelStyle {
                                   TextDecorations           = decorations
                               }, LayoutParameter            = InteriorLabelModel.Center }
                }
            };

            // create the graphs
            viewGraphs = builder.CreateViewGraphs();
            SetPageNumber(0, null);

            // set the new page bounds
            pageBoundsVisualCreator.PageWidth  = pageWidth;
            pageBoundsVisualCreator.PageHeight = pageHeight;
            ShowLoadingIndicator(false);
        }
        /// <summary>
        /// Applies the result of the multipage layout using a <see cref="MultiPageIGraphBuilder"/>.
        /// </summary>
        private void ApplyLayoutResult(MultiPageLayoutResult multiPageLayout, double pageWidth, double pageHeight)
        {
            // typeface format for underlined labels
            Font normalFont = new Font(SystemFonts.DefaultFont.FontFamily, 9.0f, GraphicsUnit.Pixel);
            Font font       = new Font(SystemFonts.DefaultFont.FontFamily, 9.0f, FontStyle.Underline, GraphicsUnit.Pixel);

            // use the MultiPageGraphBuilder to create a list of IGraph instances that represent the single pages
            MultiPageIGraphBuilder builder = new MultiPageIGraphBuilder(multiPageLayout)
            {
                // assign custom template node styles for the auxiliary nodes introduced by the multipage layout.
                // also set the label style and model parameter.
                // if nothing is specified, the values of the original graph are copied.
                NormalNodeDefaults =
                {
                    Style               =
                        new ShapeNodeStyle {
                        Shape = ShapeNodeShape.RoundRectangle,
                        Pen   = new Pen(Color.FromArgb(0xFF, 0x99, 0xCC, 0xFF)),
                        Brush =
                            new LinearGradientBrush(new Point(0, 0), new Point(0, 1), Color.FromArgb(0xFF, 0xCC, 0xFF, 0xFF),
                                                    Color.FromArgb(0xFF, 0x99, 0xCC, 0xFF))
                    },
                    Labels              =
                    {
                        Style           = new DefaultLabelStyle {
                            Font        = normalFont
                        },
                        LayoutParameter = InteriorLabelModel.Center
                    }
                },
                ConnectorNodeDefaults =
                {
                    Style               =
                        new ShapeNodeStyle {
                        Shape = ShapeNodeShape.RoundRectangle,
                        Pen   = new Pen(Color.FromArgb(0xFF, 0xFF, 0x99, 0x00)),
                        Brush =
                            new LinearGradientBrush(new Point(0, 0), new Point(0, 1), Color.FromArgb(0xFF, 0xFF, 0xCC, 0x00), Color.FromArgb(0xFF, 0xFF, 0x99, 0x00))
                    },
                    Labels              =
                    {
                        Style           = new DefaultLabelStyle {
                            Font        = font
                        },
                        LayoutParameter = InteriorLabelModel.Center
                    }
                },
                ProxyNodeDefaults =
                {
                    Style               =
                        new ShapeNodeStyle {
                        Shape = ShapeNodeShape.RoundRectangle,
                        Pen   = new Pen(Color.FromArgb(0xFF, 0x99, 0xCC, 0x33)),
                        Brush =
                            new LinearGradientBrush(new Point(0, 0), new Point(0, 1), Color.FromArgb(0xFF, 0xCC, 0xFF, 0x99), Color.FromArgb(0xFF, 0x99, 0xCC, 0x33))
                    },
                    Labels              =
                    {
                        Style           = new DefaultLabelStyle {
                            Font        = font
                        },
                        LayoutParameter = InteriorLabelModel.Center
                    }
                },
                ProxyReferenceNodeDefaults =
                {
                    Style               =
                        new ShapeNodeStyle {
                        Shape = ShapeNodeShape.RoundRectangle,       Pen = new Pen(Color.FromArgb(0xFF, 0xFF, 0x00, 0xFF)),
                        Brush = new LinearGradientBrush(new Point(0,              0), new Point(0, 1), Color.FromArgb(0xFF, 0xFF, 0xA6, 0xFF), Color.FromArgb(0xFF, 0xFF, 0x00, 0xFF))
                    },
                    Labels              =
                    {
                        Style           = new DefaultLabelStyle {
                            Font        = font
                        },
                        LayoutParameter = InteriorLabelModel.Center
                    }
                }
            };


            // create the graphs
            viewGraphs = builder.CreateViewGraphs();
            SetPageNumber(0, null);

            // set the new page bounds
            pageBoundsVisualCreator.PageWidth  = pageWidth;
            pageBoundsVisualCreator.PageHeight = pageHeight;
            ShowLoadingIndicator(false);
            graphControl.Focus();
        }