WidgetBuilderBase class.
Definition
Namespace:Kendo.Mvc.UI.Fluent
Assembly:Kendo.Mvc.dll
Type Parameters:
TViewComponent
TBuilder
Syntax:
public class WidgetBuilderBase<TViewComponent, TBuilder> : HelperResult, IHtmlContent where TViewComponent : WidgetBase where TBuilder : WidgetBuilderBase<TViewComponent, TBuilder>
Inheritance: objectHelperResultWidgetBuilderBase<TViewComponent, TBuilder>
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the WidgetBuilderBase class.
protected WidgetBuilderBase(TViewComponent component)
The component.
Properties
Component
TViewComponent
Gets the view component.
protected TViewComponent Component { get; set; }
The component.
Container
TViewComponent
Alias for the component as used from settings builder
protected TViewComponent Container { get; }
The settings container.
Methods
Specifies whether the initialization script of the component will be rendered as a JavaScript module.
public virtual TBuilder AsModule(bool value)
TBuilder
Returns the current TBuilder instance.
Suppress initialization script rendering. Note that this options should be used in conjunction with DeferredScripts(bool, bool)
public virtual DeferredWidgetBuilder<TViewComponent> Deferred(bool deferred = true)
DeferredWidgetBuilder<TViewComponent>
Returns a DeferredWidgetBuilder<TViewComponent> instance.
Sets the name of the component.
public virtual TBuilder Explorer(ModelExplorer modelExplorer)
The name.
Returns:TBuilder
Returns the current TBuilder instance.
Sets the name of the component.
public virtual TBuilder Expression(string modelExpression)
The name.
Returns:TBuilder
Returns the current TBuilder instance.
Sets the HTML attributes.
public virtual TBuilder HtmlAttributes(IDictionary<string, object> attributes)
The HTML attributes.
Returns:TBuilder
Returns the current TBuilder instance.
Sets the HTML attributes.
public virtual TBuilder HtmlAttributes(object attributes)
The HTML attributes.
Returns:TBuilder
Returns the current TBuilder instance.
Sets the name of the component.
public virtual TBuilder Name(string componentName)
The name.
Returns:TBuilder
Returns the current TBuilder instance.
Renders the component in place.
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
Returns the current TBuilder instance.
Sets the JavaScript attributes to the initialization script.
Returns the client template for the component.
Returns the internal view component.
public TViewComponent ToComponent()
TViewComponent
The TViewComponent instance that represents the component.
Returns the HTML representation of the component.
public override void WriteTo(TextWriter writer, HtmlEncoder encoder)
Overrides:
Operators
implicit operator TViewComponent method.
public static implicit operator TViewComponent(WidgetBuilderBase<TViewComponent, TBuilder> builder)
TViewComponent