Browse Source

Merge pull request #576 from gumme/WpfDesignerNegativeWidthHeightCheck

pull/416/merge
Andreas Weizel 11 years ago
parent
commit
c354785757
  1. 11
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/DesignPanel.cs

11
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/DesignPanel.cs

@ -407,11 +407,14 @@ namespace ICSharpCode.WpfDesign.Designer @@ -407,11 +407,14 @@ namespace ICSharpCode.WpfDesign.Designer
bounds.Width,
bounds.Height);
} else {
info.Bounds = new Rect(bounds.Left,
bounds.Top,
bounds.Width + dx,
bounds.Height + dy);
if (info.OriginalBounds.Width + dx >= 0 && info.OriginalBounds.Height + dy >= 0) {
info.Bounds = new Rect(info.OriginalBounds.Left,
info.OriginalBounds.Top,
info.OriginalBounds.Width + dx,
info.OriginalBounds.Height + dy);
}
}
placementOp.CurrentContainerBehavior.SetPosition(info);
}
}

Loading…
Cancel
Save