Esempio n. 1
0
        internal static string ToString(FlexLength flexLength, CultureInfo cultureInfo)
        {
            switch (flexLength.UnitType)
            {
            case FlexLengthUnitType.Auto:
                return("Auto");

            case FlexLengthUnitType.Star:
                return(flexLength.Value.IsCloseTo(1.0) ? "*" : Convert.ToString(flexLength.Value, cultureInfo) + "*");

            default:
                return(Convert.ToString(flexLength.Value, cultureInfo));
            }
        }
Esempio n. 2
0
 public static void SetLength(DependencyObject element, FlexLength value)
 {
     element.SetValue(LengthProperty, value);
 }