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
bounds.Width, bounds.Width,
bounds.Height); bounds.Height);
} else { } else {
info.Bounds = new Rect(bounds.Left, if (info.OriginalBounds.Width + dx >= 0 && info.OriginalBounds.Height + dy >= 0) {
bounds.Top, info.Bounds = new Rect(info.OriginalBounds.Left,
bounds.Width + dx, info.OriginalBounds.Top,
bounds.Height + dy); info.OriginalBounds.Width + dx,
info.OriginalBounds.Height + dy);
}
} }
placementOp.CurrentContainerBehavior.SetPosition(info); placementOp.CurrentContainerBehavior.SetPosition(info);
} }
} }

Loading…
Cancel
Save