示例#1
0
        public Textbox(string text, string placeholder = null, 
			bool multiLine = false, int? rows = null,
			TextboxSize size = null, GridSize gridSize = null, 
			string width = null, string height = null, 
			string helpText = null, 
			string clientId = null)
            : base("_Textbox",clientId)
        {
            SetText(text)
                .SetPlaceholder(placeholder)
                .SetMultiLine(multiLine, rows)
                .SetSize(size, gridSize, width, height)
                .SetHelpText(helpText);
        }
示例#2
0
    public static MvcHtmlString UxTextbox(this HtmlHelper helper,
		string text,
		string placeholder = null,
		bool multiLine = false,
		int? rows = null,
		TextboxSize size = null,
		GridSize gridSize = null,
		string width = null,
		string height = null,
		string helpText = null,
		string clientId = null)
    {
        var textbox = new Textbox(text, placeholder,
            multiLine, rows, size, gridSize,
            width, height, helpText, clientId);
        return helper.RenderUxControl(textbox);
    }
示例#3
0
 public Textbox SetSize(TextboxSize size = null, GridSize gridSize = null, string width = null, string height= null)
 {
     Size = size ?? TextboxSize.Default;
     GridSize = gridSize ?? GridSize.NotSet;
     Width = width;
     Height = height;
     return this;
 }