private void ApplyWidth(LayerPropertiesModel properties, float percentage)
{
var newWidth = Math.Round(percentage*(float) properties.Width, 2);
var difference = properties.Width - newWidth;
if (newWidth < 0)
newWidth = 0;
properties.Width = newWidth;
// Apply the right to left option
if (LayerPropertyOptions == LayerPropertyOptions.RightToLeft)
properties.X = properties.X + difference;
}