Exemplo n.º 1
0
    public static MvcHtmlString UxNavLink(this HtmlHelper helper, string text, string url, IconType iconType = null, IconPosition iconPosition = null, bool active = false, bool disabled = false, bool iconPullRight = false, DataToggle dataToggle = DataToggle.None, string badgeText = null, bool badgePullRight = false, string clientId = null)
    {
        var navLink = new NavLink(text, url, iconType, iconPosition, active, disabled, iconPullRight, dataToggle, clientId);
        if (badgeText != null)
            navLink.SetBadge(new Badge(badgeText, badgePullRight));

        return helper.RenderUxControl(navLink);
    }
Exemplo n.º 2
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);
 }
Exemplo n.º 3
0
        public NavLink(string text, 
			string url, 
			IconType icon = null, 
			IconPosition position = null, 
			bool active = false, 
			bool disabled= false,
			bool iconPullRight = false,
			DataToggle dataToggle = DataToggle.None,
			string clientId = null)
            : base("_NavLink", clientId)
        {
            SetText(text)
                .SetUrl(url)
                .SetIcon(icon,position, iconPullRight)
                .SetActive(active)
                .SetDisabled(disabled)
                .SetDataToggle(dataToggle);
        }
Exemplo n.º 4
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);
    }
Exemplo n.º 5
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);
 }
Exemplo n.º 6
0
 public NavLink SetIcon(IconType icon, IconPosition position, bool pullRight = false)
 {
     IconType = icon;
     IconPosition = position ?? IconPosition.Left;
     IconPullRight = pullRight;
     return this;
 }
Exemplo n.º 7
0
 public LinkButton SetIcon(IconType icon, IconPosition position)
 {
     IconType = icon;
     IconPosition = position ?? IconPosition.Left;
     return this;
 }