コード例 #1
0
 public static MvcHtmlString UxCancelButton(this HtmlHelper helper, ButtonSize size = null, string clientId = null)
 {
     var button = new Button("Cancel", ButtonCommand.Cancel)
         .SetValidation(false)
         .SetSize(size);
     button.SetClientId(clientId);
     return UxButton(helper, button);
 }
コード例 #2
0
 public static MvcHtmlString UxSaveButton(this HtmlHelper helper, ButtonSize size = null, string clientId = null)
 {
     var button = new Button("Save", ButtonCommand.Save, ButtonAppearanceType.Success)
         .SetIcon(new Icon(IconType.Check))
         .SetSize(size);
     button.SetClientId(clientId);
     return UxButton(helper, button);
 }
コード例 #3
0
 public static MvcHtmlString UxDeleteButton(this HtmlHelper helper, ButtonSize size = null, string clientId = null)
 {
     var button = new Button("Delete", ButtonCommand.Delete)
         .SetValidation(false)
         .SetIcon(new Icon(IconType.TrashOutlined))
         .SetSize(size);
     button.SetClientId(clientId);
     return UxButton(helper, button);
 }
コード例 #4
0
 public LinkButton(string text, string url, string target = null, ButtonAppearanceType appearance = null, ButtonSize size = null, IconType icon = null, IconPosition position = null, Popover popover = null, string clientId = null)
     : base("_LinkButton",clientId)
 {
     SetLink(text, url)
         .SetTarget(target)
         .SetAppearance(appearance)
         .SetIcon(icon, position)
         .SetSize(size)
         .SetPopover(popover);
 }
コード例 #5
0
    public static MvcHtmlString UxButton(this HtmlHelper helper,
        string text,
        ButtonAppearanceType appearance = null,
        ButtonSize size = null,
        IconType iconType = null,
        IconPosition position = null,
        bool causesValidation = true,
        bool disabled = false,
        string loadingText = null,
        string clientId = null)
    {
        var button = new Button(text, ButtonCommand.None, appearance)
            .SetSize(size)
            .SetValidation(causesValidation)
            .SetDisabled(disabled)
            .SetLoadingText(loadingText);

        button.SetClientId(clientId);

        if (iconType!=null)
            button.SetIcon(new Icon(iconType), position);

        return UxButton(helper, button);
    }
コード例 #6
0
 public static MvcHtmlString UxLinkButton(this HtmlHelper helper, string text, string url, string target = null, ButtonAppearanceType appearance = null, ButtonSize size = null, IconType icon = null, IconPosition iconPosition = null, Popover popover = null, string clientId = null)
 {
     var link = new LinkButton(text, url, target, appearance, size, icon, iconPosition, popover,clientId);
     return helper.RenderUxControl(link);
 }
コード例 #7
0
 public LinkButton SetSize(ButtonSize size)
 {
     Size = size ?? ButtonSize.Default;
     return this;
 }