/// <summary>
        /// Setup default values for various configuration parameters.
        /// </summary>
        public TreeLayoutConfig()
        {
            var aspectRatioNodePlacer = new AspectRatioNodePlacer();

            RoutingStyleForNonTreeEdgesItem = EnumRoute.Orthogonal;
            EdgeBundlingStrengthItem        = 0.95;
            ActOnSelectionOnlyItem          = false;

            DefaultLayoutOrientationItem = LayoutOrientation.TopToBottom;

            ConsiderNodeLabelsItem = false;

            NodePlacerItem = EnumNodePlacer.Default;

            SpacingItem           = 20;
            RootAlignmentItem     = EnumRootAlignment.Center;
            AllowMultiParentsItem = false;
            PortAssignmentItem    = PortAssignmentMode.None;

            NodePlacerAspectRatioItem = aspectRatioNodePlacer.AspectRatio;

            EdgeLabelingItem              = EnumEdgeLabeling.None;
            LabelPlacementAlongEdgeItem   = EnumLabelPlacementAlongEdge.Centered;
            LabelPlacementSideOfEdgeItem  = EnumLabelPlacementSideOfEdge.OnEdge;
            LabelPlacementOrientationItem = EnumLabelPlacementOrientation.Horizontal;
            LabelPlacementDistanceItem    = 10;
        }
        /// <summary>
        /// Setup default values for various configuration parameters.
        /// </summary>
        public TreeLayoutConfig()
        {
            var layout = new ClassicTreeLayout();
            var aspectRatioNodePlacer = new AspectRatioNodePlacer();
            var defaultNodePlacer     = new DefaultNodePlacer();

            LayoutStyleItem = EnumStyle.Default;
            RoutingStyleForNonTreeEdgesItem = EnumRoute.Orthogonal;
            EdgeBundlingStrengthItem        = 0.95;
            ActOnSelectionOnlyItem          = false;

            DefaultLayoutOrientationItem = LayoutOrientation.TopToBottom;
            ClassicLayoutOrientationItem = LayoutOrientation.TopToBottom;

            MinimumNodeDistanceItem  = (int)layout.MinimumNodeDistance;
            MinimumLayerDistanceItem = (int)layout.MinimumLayerDistance;
            PortStyleItem            = PortStyle.NodeCenter;

            ConsiderNodeLabelsItem = false;

            OrthogonalEdgeRoutingItem = false;

            VerticalAlignmentItem     = 0.5;
            ChildPlacementPolicyItem  = LeafPlacement.SiblingsOnSameLayer;
            EnforceGlobalLayeringItem = false;

            NodePlacerItem = EnumNodePlacer.Default;

            SpacingItem           = 20;
            RootAlignmentItem     = EnumRootAlignment.Center;
            AllowMultiParentsItem = false;
            PortAssignmentItem    = PortAssignmentMode.None;

            HvHorizontalSpaceItem = (int)defaultNodePlacer.HorizontalDistance;
            HvVerticalSpaceItem   = (int)defaultNodePlacer.VerticalDistance;

            BusAlignmentItem = 0.5;

            ArHorizontalSpaceItem     = (int)aspectRatioNodePlacer.HorizontalDistance;
            ArVerticalSpaceItem       = (int)aspectRatioNodePlacer.VerticalDistance;
            NodePlacerAspectRatioItem = aspectRatioNodePlacer.AspectRatio;

            ArUseViewAspectRatioItem        = true;
            CompactPreferredAspectRatioItem = aspectRatioNodePlacer.AspectRatio;

            EdgeLabelingItem              = EnumEdgeLabeling.None;
            LabelPlacementAlongEdgeItem   = EnumLabelPlacementAlongEdge.Centered;
            LabelPlacementSideOfEdgeItem  = EnumLabelPlacementSideOfEdge.OnEdge;
            LabelPlacementOrientationItem = EnumLabelPlacementOrientation.Horizontal;
            LabelPlacementDistanceItem    = 10;
        }
    private MultiStageLayout ConfigureCompactLayout(GraphControl graphControl) {
      var layout = new TreeLayout();
      var aspectRatioNodePlacer = new AspectRatioNodePlacer();

      if (graphControl != null && ArUseViewAspectRatioItem) {
        var size = graphControl.InnerSize;
        aspectRatioNodePlacer.AspectRatio = size.Width / size.Height;
      } else {
        aspectRatioNodePlacer.AspectRatio = CompactPreferredAspectRatioItem;
      }

      aspectRatioNodePlacer.HorizontalDistance = ArHorizontalSpaceItem;
      aspectRatioNodePlacer.VerticalDistance = ArVerticalSpaceItem;

      layout.DefaultNodePlacer = aspectRatioNodePlacer;
      return layout;
    }