public void Refresh()
 {
     var width = _scale.Width.ToPixel(_parent.Width);
     if (!0f.Equals(_scale.Ratio))
     {
         _scale = _scale.SetHeight(_scale.Height.Unit == Number.Units.Pixel
             ? (width.Value*_scale.Ratio).Pixel()
             : (width.Value*_scale.Ratio).Pixel().ToPercentage(_parent.Height));
     }
     var height = _scale.Height.ToPixel(_parent.Height);
     var x = _position.X.ToPixel(_parent.Width - width.Value);
     var y = _position.Y.ToPixel(_parent.Height - height.Value);
     _rect = new Rect(x.Value, y.Value, width.Value, height.Value);
 }
Exemple #2
0
 public static Scale Copy(Scale value)
 {
     return value.Copy();
 }