Пример #1
0
 public ButtonGroup(bool toggle = false, ButtonGroupSize size = null, string selectedValue = null, DataSource dataSource = null, string clientId = null)
     : base("_ButtonGroup", clientId)
 {
     SetToggle(toggle)
         .SetSize(size)
         .SetDataSource(dataSource)
         .SetSelectedValue(selectedValue);
 }
    public static MvcHtmlString UxButtonGroupWithDataSource(this HtmlHelper htmlHelper, DataSource dataSource, string selectedValue = null, ButtonGroupSize size = null, string clientId = null)
    {
        var group = new ButtonGroup(true, size, selectedValue, dataSource, clientId);

        MvcHtmlString start = htmlHelper.Partial("ControlTemplates/" + group.ViewTemplate + "Start", group);
        MvcHtmlString end = htmlHelper.Partial("ControlTemplates/" + group.ViewTemplate + "End", group);

        return MvcHtmlString.Create(start.ToHtmlString() + end.ToHtmlString());
    }
Пример #3
0
 public ButtonGroup SetSize(ButtonGroupSize size)
 {
     Size = size ?? ButtonGroupSize.Default;
     return this;
 }
Пример #4
0
 public static IDisposable UxButtonGroup(this HtmlHelper htmlHelper, bool toggle = false, ButtonGroupSize size = null, string clientId = null)
 {
     var group = new ButtonGroup(toggle, size, null, null, clientId);
     return RenderUxDispoableWebControl(htmlHelper, group);
 }