protected BaseGridFilter(string labelText, string inputName, TextBoxTypeEnum type = default, string tooltip = default) { Check.NotEmpty(labelText, nameof(labelText)); Check.NotEmpty(inputName, nameof(inputName)); this.Tooltip = tooltip; this.LabelText = labelText; this.InputName = inputName; this._inputType = JavaScriptEnumMappings.ToString(type); }
/// <summary> /// Text box type enum. /// </summary> /// <param name="type"></param> /// <returns></returns> public static string ToString(TextBoxTypeEnum type) { switch (type) { case TextBoxTypeEnum.Text: return("text"); case TextBoxTypeEnum.Password: return("password"); case TextBoxTypeEnum.Hidden: return("hidden"); default: throw new Exception("error type."); } }
public LabeledIntegerBox(string label, Expression <Func <TPostModel, int?> > expression, Expression <Func <TModel, int?> > modelExpression = null, TextBoxTypeEnum type = default) { this._expression = expression; this._modelExpression = modelExpression; this._label = label; this.type = JavaScriptEnumMappings.ToString(type); }
public static void SetTypeFormat(DependencyObject dependencyObject, TextBoxTypeEnum value) { dependencyObject.SetValue(TypeFormatProperty, value); }