WebControl ActionControlStyle.SetUpControl(WebControl control, string defaultText) { control.CssClass = control.CssClass.ConcatenateWithSpace( ActionComponentCssElementCreator.AllStylesClass.ClassName + " " + ActionComponentCssElementCreator.TextStyleClass.ClassName); return(control.AddControlsReturnThis(ActionComponentIcon.GetIconAndTextComponents(icon, Text.Any() ? Text : defaultText).GetControls())); }
WebControl ActionControlStyle.SetUpControl(WebControl control, string defaultText) { var cssElement = ActionComponentCssElementCreator.NormalButtonStyleClass.ClassName; if (buttonSize == ButtonSize.ShrinkWrap) { cssElement = ActionComponentCssElementCreator.ShrinkWrapButtonStyleClass.ClassName; } else if (buttonSize == ButtonSize.Large) { cssElement = ActionComponentCssElementCreator.LargeButtonStyleClass.ClassName; } control.CssClass = control.CssClass.ConcatenateWithSpace(ActionComponentCssElementCreator.AllStylesClass.ClassName + " " + cssElement); return(control.AddControlsReturnThis(ActionComponentIcon.GetIconAndTextComponents(icon, text.Any() ? text : defaultText).GetControls())); }