Class Navigation<TModel>
Wraps the output of the navigation area of a form. For example the area with submit buttons.
Inherited Members
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 SourceNavigation(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 SourceBegin()
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
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 |
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 |
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 |
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
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
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |