public static void SetPadding(object e, Thickness padding) { jQueryObject elementAsJq = GetElementFromObject(e); elementAsJq.Attribute( AttributeNamePrefix + "padding", Math.Round(padding.Top) + " " + Math.Round(padding.Right) + " " + Math.Round(padding.Bottom) + " " + Math.Round(padding.Left)); elementAsJq.Data(DataNameLayoutState, ParseAdvancedLayout(elementAsJq)); }
public static void SetMargin(object e, Thickness margin) { jQueryObject elementAsJq = GetElementFromObject(e); if (margin == null) { elementAsJq.RemoveAttr(AttributeNamePrefix + "margin"); } else { elementAsJq.Attribute( AttributeNamePrefix + "margin", Math.Round(margin.Top) + " " + Math.Round(margin.Right) + " " + Math.Round(margin.Bottom) + " " + Math.Round(margin.Left)); elementAsJq.Data(DataNameLayoutState, ParseAdvancedLayout(elementAsJq)); } }