Beispiel #1
0
        WebControl ActionControlStyle.SetUpControl(WebControl control, string defaultText, Unit width, Unit height, Action <Unit> widthSetter)
        {
            widthSetter(width);

            var cssElement = CssElementCreator.NormalButtonStyleClass;

            if (buttonSize == ButtonSize.ShrinkWrap)
            {
                cssElement = CssElementCreator.ShrinkWrapButtonStyleClass;
            }
            else if (buttonSize == ButtonSize.Large)
            {
                cssElement = CssElementCreator.LargeButtonStyleClass;
            }
            control.CssClass = control.CssClass.ConcatenateWithSpace(CssElementCreator.AllStylesClass + " " + cssElement);

            return(control.AddControlsReturnThis(ActionControlIcon.GetIconAndTextControls(icon, text.Any() ? text : defaultText)));
        }
 WebControl ActionControlStyle.SetUpControl(WebControl control, string defaultText, Unit width, Unit height, Action <Unit> widthSetter)
 {
     control.CssClass = control.CssClass.ConcatenateWithSpace(CssElementCreator.AllStylesClass + " " + CssElementCreator.TextStyleClass);
     return(control.AddControlsReturnThis(ActionControlIcon.GetIconAndTextControls(icon, Text.Any() ? Text : defaultText)));
 }