public String GetWidthAsString() { String w = width.ToString(System.Globalization.CultureInfo.InvariantCulture); if (w.EndsWith(".0")) w = w.Substring(0, w.Length - 2); if (percentage) w += "%"; return w; }