private void documentPaddingButton_Click(object sender, System.EventArgs e) { Nevron.Diagram.NMargins result = new Nevron.Diagram.NMargins(); if (Nevron.Diagram.Editors.NMarginsTypeEditor.Edit(view.DocumentPadding, ref result) == false) { return; } view.DocumentPadding = result; view.Refresh(); }
private void ChangePadding() { Nevron.Diagram.NMargins margins = new Nevron.Diagram.NMargins(0); try { margins.Left = Single.Parse(paddingLeftTextBox.Text); margins.Right = Single.Parse(paddingRightTextBox.Text); margins.Top = Single.Parse(paddingTopTextBox.Text); margins.Bottom = Single.Parse(paddingBottomTextBox.Text); } catch (Exception ex) { Debug.WriteLine("Change padding failed with exception: " + ex.Message); return; } document.AutoBoundsPadding = margins; }
private void marginsButton_Click(object sender, System.EventArgs e) { // get the selected label NBoundsLabel label = labelsCombo.SelectedItem as NBoundsLabel; if (label == null) { return; } // change the bounds label margins Nevron.Diagram.NMargins margins = new Nevron.Diagram.NMargins(); if (Nevron.Diagram.Editors.NMarginsTypeEditor.Edit(label.Margins, ref margins) == false) { return; } label.Margins = margins; document.SmartRefreshAllViews(); }