Interface IForm<TModel>
Interface for a Chameleon Form.
Inherited Members
System.IDisposable.Dispose()
Namespace: ChameleonForms
Assembly: ChameleonForms.dll
Syntax
public interface IForm<TModel> : IForm, IDisposable
Type Parameters
Name | Description |
---|---|
TModel | The view model type for the current view |
Properties
| Improve this Doc View SourceHtmlHelper
The HTML helper for the current view.
Declaration
IHtmlHelper<TModel> HtmlHelper { get; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel> |
Template
The template renderer for the current view.
Declaration
IFormTemplate Template { get; }
Property Value
Type | Description |
---|---|
IFormTemplate |
Methods
| Improve this Doc View SourceCreatePartialForm(IHtmlHelper<TModel>)
Returns a wrapped ChameleonForms.PartialViewForm`1 for the given partial view helper.
Declaration
IForm<TModel> CreatePartialForm(IHtmlHelper<TModel> partialViewHelper)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Mvc.Rendering.IHtmlHelper<TModel> | partialViewHelper | The HTML Helper from the partial view |
Returns
Type | Description |
---|---|
IForm<TModel> | The PartialViewForm wrapping the original form |
GetFieldGenerator<T>(Expression<Func<TModel, T>>)
The field generator for the given field.
Declaration
IFieldGenerator GetFieldGenerator<T>(Expression<Func<TModel, T>> property)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression<System.Func<TModel, T>> | property | The property to return the field generator for |
Returns
Type | Description |
---|---|
IFieldGenerator |
Type Parameters
Name | Description |
---|---|
T |
Write(IHtmlContent)
Writes a HTML String directly to the view's output.
Declaration
void Write(IHtmlContent htmlContent)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Html.IHtmlContent | htmlContent | The HTML to write to the view's output |