Beispiel #1
0
 public ScaleWindowViewModel(double pixelLength, ZoomTool oldScale)
 {
     this.PixelLength = pixelLength;
     this.oldScale    = oldScale;
     FactLength       = oldScale.TransformToActualLength(PixelLength);
     ApplyCommand     = new RelayCommand(p => Apply(), p => CanApply());
     CanselCommand    = new RelayCommand(p => Cansel());
 }
        public override void ApplyScale(ZoomTool scale)
        {
            if (!Model.AutoSize)
            {
                return;
            }

            (Model as Section).Length = scale.TransformToActualLength(Length);
        }