示例#1
0
        internal static void SetPadding(IArrangedElement element, Padding value)
        {
            Debug.Assert(value != GetPadding(element, new Padding(-7105)),
                         "PERF: Caller should guard against setting Padding to original value.");

            value = LayoutUtils.ClampNegativePaddingToZero(value);
            element.Properties.SetPadding(_paddingProperty, value);

            Debug.Assert(GetPadding(element, new Padding(-7105)) == value, "Error detected setting Padding.");
        }
示例#2
0
 internal static void SetPadding(IArrangedElement element, Padding value)
 {
     value = LayoutUtils.ClampNegativePaddingToZero(value);
     element.Properties.SetPadding(_paddingProperty, value);
 }