Show / Hide Table of Contents

    Class Navigation<TModel>

    Wraps the output of the navigation area of a form. For example the area with submit buttons.

    Inheritance
    System.Object
    FormComponent<TModel>
    Navigation<TModel>
    Implements
    IFormComponent<TModel>
    Microsoft.AspNetCore.Html.IHtmlContent
    System.IDisposable
    Inherited Members
    FormComponent<TModel>.IsSelfClosing
    FormComponent<TModel>.Form
    FormComponent<TModel>.Initialise()
    FormComponent<TModel>.WriteTo(TextWriter, HtmlEncoder)
    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.Component
    Assembly: ChameleonForms.dll
    Syntax
    public class Navigation<TModel> : FormComponent<TModel>, IFormComponent<TModel>, IHtmlContent, IDisposable
    Type Parameters
    Name Description
    TModel

    The view model type for the current view

    Constructors

    | Improve this Doc View Source

    Navigation(IForm<TModel>)

    Creates a form navigation area.

    Declaration
    public Navigation(IForm<TModel> form)
    Parameters
    Type Name Description
    IForm<TModel> form

    The form the message is being created in

    Methods

    | Improve this Doc View Source

    Begin()

    Returns the HTML representation of the beginning of the form component.

    Declaration
    public override IHtmlContent Begin()
    Returns
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent

    The beginning HTML for the form component

    Overrides
    ChameleonForms.Component.FormComponent<TModel>.Begin()
    | Improve this Doc View Source

    Button(IHtmlContent)

    Creates the HTML for a <button>.

    Declaration
    public ButtonHtmlAttributes Button(IHtmlContent content)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Html.IHtmlContent content

    The content to display in the button

    Returns
    Type Description
    ButtonHtmlAttributes

    Html attributes class to chain modifications to the button's attributes; call .ToHtmlString() to generate the button HTML

    | Improve this Doc View Source

    Button(Func<Object, IHtmlContent>)

    Creates the HTML for a <button>.

    Declaration
    public ButtonHtmlAttributes Button(Func<dynamic, IHtmlContent> content)
    Parameters
    Type Name Description
    System.Func<System.Object, Microsoft.AspNetCore.Html.IHtmlContent> content

    The content to display in the button as a templated razor delegate

    Returns
    Type Description
    ButtonHtmlAttributes

    Html attributes class to chain modifications to the button's attributes; call .ToHtmlString() to generate the button HTML

    | Improve this Doc View Source

    Button(String)

    Creates the HTML for a <button>.

    Declaration
    public ButtonHtmlAttributes Button(string text)
    Parameters
    Type Name Description
    System.String text

    The text to display in the button

    Returns
    Type Description
    ButtonHtmlAttributes

    Html attributes class to chain modifications to the button's attributes; call .ToHtmlString() to generate the button HTML

    | Improve this Doc View Source

    Dispose()

    Called when form component is created within a using block: writes the end tag(s) of the component.

    Declaration
    public override void Dispose()
    Overrides
    ChameleonForms.Component.FormComponent<TModel>.Dispose()
    | Improve this Doc View Source

    End()

    Returns the HTML representation of the end of the form component.

    Declaration
    public override IHtmlContent End()
    Returns
    Type Description
    Microsoft.AspNetCore.Html.IHtmlContent

    The ending HTML for the form component

    Overrides
    ChameleonForms.Component.FormComponent<TModel>.End()
    | Improve this Doc View Source

    Reset(IHtmlContent)

    Creates the HTML for a reset <button>.

    Declaration
    public ButtonHtmlAttributes Reset(IHtmlContent content)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Html.IHtmlContent content

    The content to display for the button

    Returns
    Type Description
    ButtonHtmlAttributes

    Html attributes class to chain modifications to the button's attributes; call .ToHtmlString() to generate the button HTML

    | Improve this Doc View Source

    Reset(Func<Object, IHtmlContent>)

    Creates the HTML for a reset <button>.

    Declaration
    public ButtonHtmlAttributes Reset(Func<dynamic, IHtmlContent> content)
    Parameters
    Type Name Description
    System.Func<System.Object, Microsoft.AspNetCore.Html.IHtmlContent> content

    The content to display for the button as a templated razor delegate

    Returns
    Type Description
    ButtonHtmlAttributes

    Html attributes class to chain modifications to the button's attributes; call .ToHtmlString() to generate the button HTML

    | Improve this Doc View Source

    Reset(String)

    Creates the HTML for a reset <button>.

    Declaration
    public ButtonHtmlAttributes Reset(string text)
    Parameters
    Type Name Description
    System.String text

    The text to display for the button

    Returns
    Type Description
    ButtonHtmlAttributes

    Html attributes class to chain modifications to the button's attributes; call .ToHtmlString() to generate the button HTML

    | Improve this Doc View Source

    Submit(IHtmlContent)

    Creates the HTML for a submit <button>.

    Declaration
    public ButtonHtmlAttributes Submit(IHtmlContent content)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Html.IHtmlContent content

    The content to display in the button

    Returns
    Type Description
    ButtonHtmlAttributes

    Html attributes class to chain modifications to the button's attributes; call .ToHtmlString() to generate the button HTML

    | Improve this Doc View Source

    Submit(Func<Object, IHtmlContent>)

    Creates the HTML for a submit <button>.

    Declaration
    public ButtonHtmlAttributes Submit(Func<dynamic, IHtmlContent> content)
    Parameters
    Type Name Description
    System.Func<System.Object, Microsoft.AspNetCore.Html.IHtmlContent> content

    The content to display in the button as a templated razor delegate

    Returns
    Type Description
    ButtonHtmlAttributes

    Html attributes class to chain modifications to the button's attributes; call .ToHtmlString() to generate the button HTML

    | Improve this Doc View Source

    Submit(String)

    Creates the HTML for a submit <button>.

    Declaration
    public ButtonHtmlAttributes Submit(string text)
    Parameters
    Type Name Description
    System.String text

    The text to display in the button

    Returns
    Type Description
    ButtonHtmlAttributes

    Html attributes class to chain modifications to the button's attributes; call .ToHtmlString() to generate the button HTML

    | Improve this Doc View Source

    Submit(String, String, IHtmlContent)

    Creates the HTML for a submit button that submits a value in the form post when clicked.

    Declaration
    public ButtonHtmlAttributes Submit(string name, string value, IHtmlContent content = null)
    Parameters
    Type Name Description
    System.String name

    The name of the element

    System.String value

    The value to submit with the form

    Microsoft.AspNetCore.Html.IHtmlContent content

    The text the user sees (leave as the default null if you want the user to see the value instead)

    Returns
    Type Description
    ButtonHtmlAttributes

    Html attributes class to chain modifications to the button's attributes; call .ToHtmlString() to generate the button HTML

    | Improve this Doc View Source

    Submit(String, String, Func<Object, IHtmlContent>)

    Creates the HTML for a submit button that submits a value in the form post when clicked.

    Declaration
    public ButtonHtmlAttributes Submit(string name, string value, Func<dynamic, IHtmlContent> content)
    Parameters
    Type Name Description
    System.String name

    The name of the element

    System.String value

    The value to submit with the form

    System.Func<System.Object, Microsoft.AspNetCore.Html.IHtmlContent> content

    The text the user sees as a templated razor delegate

    Returns
    Type Description
    ButtonHtmlAttributes

    Html attributes class to chain modifications to the button's attributes; call .ToHtmlString() to generate the button HTML

    Implements

    IFormComponent<TModel>
    Microsoft.AspNetCore.Html.IHtmlContent
    System.IDisposable

    Extension Methods

    HtmlAttributesExtensions.ToHtmlAttributes(Object)
    HtmlContentExtensions.ToHtmlString(IHtmlContent)
    • Improve this Doc
    • View Source
    Back to top © Copyright 2012-2020 MRCollective, Rob Moore, Matt Davies and the contributors to ChameleonForms.