/// <summary> /// Initializes the option handler for the export /// </summary> private void SetupHandler() { handler = new OptionHandler(LayoutOptions); OptionItem componentItem = handler.AddList(ComponentAssignment, new[] { ComponentAssignmentStrategy.Single, ComponentAssignmentStrategy.Connected }, ComponentAssignmentStrategy.Single); OptionItem subgraphItem = handler.AddList(SubgraphLayout, SubGraphLayouts.Keys, LayoutIncremental); handler.AddGeneric(SubgraphPositioning, SubgraphPlacement.Barycenter).SetAttribute( OptionItem.SUPPORT_NULL_VALUE_ATTRIBUTE, false); handler.AddGeneric(EdgeRouting, EdgeRoutingStrategy.Automatic).SetAttribute( OptionItem.SUPPORT_NULL_VALUE_ATTRIBUTE, false); handler.AddGeneric(LayoutOrientationStrategy, LayoutOrientation.TopToBottom).SetAttribute( OptionItem.SUPPORT_NULL_VALUE_ATTRIBUTE, false); handler.AddInt(MinimumNodeDistance, 5, 0, int.MaxValue); handler.AddBool(AllowMirroring, true); handler.AddBool(NodeSnapping, true); var cm = new ConstraintManager(Handler); cm.SetEnabledOnValueEquals(componentItem, ComponentAssignmentStrategy.Connected, subgraphItem); }