示例#1
0
        internal static MinMaxWidth CalculateMinMaxWidthForFloat(AbstractRenderer renderer, FloatPropertyValue?floatPropertyVal
                                                                 )
        {
            bool floatPropIsRendererOwn = renderer.HasOwnProperty(Property.FLOAT);

            renderer.SetProperty(Property.FLOAT, FloatPropertyValue.NONE);
            MinMaxWidth kidMinMaxWidth = renderer.GetMinMaxWidth();

            if (floatPropIsRendererOwn)
            {
                renderer.SetProperty(Property.FLOAT, floatPropertyVal);
            }
            else
            {
                renderer.DeleteOwnProperty(Property.FLOAT);
            }
            return(kidMinMaxWidth);
        }