View component Builder base class.
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Type Parameters:
TViewComponent
TBuilder
Syntax:
public abstract class WidgetBuilderBase<TViewComponent, TBuilder> : IHtmlString where TViewComponent : WidgetBase where TBuilder : WidgetBuilderBase<TViewComponent, TBuilder>
Inheritance: objectWidgetBuilderBase<TViewComponent, TBuilder>
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the WidgetBuilderBase<TViewComponent, TBuilder> class.
protected WidgetBuilderBase(TViewComponent component)
The component.
Properties
Component
TViewComponent
Gets the view component.
protected TViewComponent Component { get; set; }
The component.
Methods
Specifies whether the initialization script of the component will be rendered as a JavaScript module.
Suppress initialization script rendering. Note that this options should be used in conjunction with WidgetFactory.DeferredScripts(bool)
public virtual TBuilder HtmlAttributes(IDictionary<string, object> attributes)
TBuilder
Sets the HTML attributes.
public virtual TBuilder HtmlAttributes(object attributes)
The HTML attributes.
Returns:TBuilder
Uses the Metadata of the Model.
public TBuilder ModelMetadata(ModelMetadata modelMetadata)
The metadata set for the Model
Returns:TBuilder
Sets the name of the component.
public virtual TBuilder Name(string componentName)
The name of the component.
Returns:TBuilder
Renders the component.
public virtual void Render()
Sets the JavaScript attributes to the initialization script.
public virtual TBuilder ScriptAttributes(IDictionary<string, object> attributes, bool overrideAttributes)
The JavaScript attributes.
overrideAttributesboolArgument which determines whether attributes should be overriden.
Returns:TBuilder
Sets the JavaScript attributes to the initialization script.
public virtual MvcHtmlString ToClientTemplate()
MvcHtmlString
Returns the internal view component.
public TViewComponent ToComponent()
TViewComponent
Operators
public static implicit operator TViewComponent(WidgetBuilderBase<TViewComponent, TBuilder> builder)
TViewComponent