Browse Source

Movement of a control is now only possible if the control is visible.

Previously you could move an element that was hidden by hovering the cursor on the edges of the hidden control, and clicking when you saw the move-cursor appear.
pull/70/head
gumme 12 years ago
parent
commit
2e0026d59c
  1. 6
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/PanelMoveAdorner.cs

6
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/PanelMoveAdorner.cs

@ -47,10 +47,14 @@ namespace ICSharpCode.WpfDesign.Designer.Controls @@ -47,10 +47,14 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
{
base.OnApplyTemplate();
var bnd = new Binding("IsVisible") {Source = item.Component};
bnd.Converter = CollapsedWhenFalse.Instance;
BindingOperations.SetBinding(this, UIElement.VisibilityProperty, bnd);
var surface = this.TryFindParent<DesignSurface>();
if (surface != null && surface.ZoomControl != null)
{
var bnd = new Binding("CurrentZoom") {Source = surface.ZoomControl};
bnd = new Binding("CurrentZoom") {Source = surface.ZoomControl};
bnd.Converter = InvertedZoomConverter.Instance;
BindingOperations.SetBinding(scaleTransform, ScaleTransform.ScaleXProperty, bnd);

Loading…
Cancel
Save