private void ApplyHeight(LayerPropertiesModel properties, float percentage)
{
var newHeight = Math.Round(percentage*(float) properties.Height, 2);
var difference = properties.Height - newHeight;
if (newHeight < 0)
newHeight = 0;
properties.Height = newHeight;
if (LayerPropertyOptions == LayerPropertyOptions.Downwards)
properties.Y = properties.Y + difference;
}