Show / Hide Table of Contents

    Class ButtonHtmlAttributesExtensions

    Extension methods on HtmlAttributes for the Twitter Bootstrap 3 template.

    Inheritance
    System.Object
    ButtonHtmlAttributesExtensions
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: ChameleonForms.Templates.TwitterBootstrap3
    Assembly: ChameleonForms.Templates.dll
    Syntax
    public static class ButtonHtmlAttributesExtensions

    Methods

    | Improve this Doc View Source

    WithIcon(ButtonHtmlAttributes, String)

    Adds the given icon to the start of a navigation button.

    Declaration
    public static ButtonHtmlAttributes WithIcon(this ButtonHtmlAttributes attrs, string icon)
    Parameters
    Type Name Description
    ButtonHtmlAttributes attrs

    The Html Attributes from a navigation button

    System.String icon

    The icon to use; see https://getbootstrap.com/docs/3.3/components/#glyphicons

    Returns
    Type Description
    ButtonHtmlAttributes

    The Html Attribute object so other methods can be chained off of it

    Examples

    @n.Submit(&quot;Submit&quot;).WithIcon(&quot;arrow-right&quot;) // Output: <button type="submit"><span class="glyphicon glyphicon-arrow-right"></span> Submit</button>

    | Improve this Doc View Source

    WithSize(ButtonHtmlAttributes, ButtonSize)

    Changes the button to use the given size.

    Declaration
    public static ButtonHtmlAttributes WithSize(this ButtonHtmlAttributes attrs, ButtonSize size)
    Parameters
    Type Name Description
    ButtonHtmlAttributes attrs

    The Html Attributes from a navigation button

    ButtonSize size

    The size of button

    Returns
    Type Description
    ButtonHtmlAttributes

    The Html Attribute object so other methods can be chained off of it

    Examples

    @n.Submit(&quot;Submit&quot;).WithSize(ButtonSize.Large)

    | Improve this Doc View Source

    WithStyle(ButtonHtmlAttributes, EmphasisStyle)

    Adds the given emphasis to the button.

    Declaration
    public static ButtonHtmlAttributes WithStyle(this ButtonHtmlAttributes attrs, EmphasisStyle style)
    Parameters
    Type Name Description
    ButtonHtmlAttributes attrs

    The Html Attributes from a navigation button

    EmphasisStyle style

    The style of button

    Returns
    Type Description
    ButtonHtmlAttributes

    The Html Attribute object so other methods can be chained off of it

    Examples

    @n.Submit(&quot;Submit&quot;).WithStyle(EmphasisStyle.Warning)

    • Improve this Doc
    • View Source
    Back to top © Copyright 2012-2020 MRCollective, Rob Moore, Matt Davies and the contributors to ChameleonForms.