public Form1() { InitializeComponent(); diagram1.BeginUpdate(); comboLytDirection.SelectedIndex = 0; DiagramAppearance(); PopulateFields(SetDataSource()); this.diagram1.View.SelectionList.Clear(); SubgraphTreeLayoutManager subLayout = new SubgraphTreeLayoutManager(this.diagram1.Model, 0, 20, 50); subLayout.LeftMargin = 100; subLayout.TopMargin = 50; subLayout.HorizontalSpacing = 75; subLayout.VerticalSpacing = 50; this.diagram1.LayoutManager = subLayout; this.diagram1.LayoutManager.UpdateLayout(null); txtHSpacing.Text = subLayout.HorizontalSpacing.ToString(); txtVSpacing.Text = subLayout.VerticalSpacing.ToString(); txtLMarigin.Text = subLayout.LeftMargin.ToString(); txtTMarigin.Text = subLayout.TopMargin.ToString(); chkAutoLayout.Checked = subLayout.AutoLayout; diagram1.EndUpdate(); }
private void dialog_BeginLayout(SubgraphTreeLayoutManager layout) { this.diagram1.LayoutManager = layout; Layouting(); }