New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Defines the fluent API for configuring the WizardStep settings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class WizardStepBuilder

Inheritance: objectWizardStepBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Initialize the WizardStepBuilder

C#
public WizardStepBuilder(WizardStep settings, ViewContext viewContext, IJavaScriptInitializer initializer, IUrlGenerator generator)
Parameters:settingsWizardStep

The WizardStep

viewContextViewContextinitializerIJavaScriptInitializergeneratorIUrlGenerator

Methods

Allows configuration of the buttons to be rendered on each step. If the array contains strings, those values will be taken as Buttons names. If the array contains objects, those will be used when initializing the actual Button instances on each step.

C#
public WizardStepBuilder Buttons(Action<WizardStepButtonFactory> configurator)
Parameters:configuratorAction<WizardStepButtonFactory>

The action that configures the buttons.

Returns:

WizardStepBuilder

Example:
C#
@(Html.Kendo().Wizard()
.Name("wizard")
.Steps(steps =&gt;
{
steps.Add().Title("Welcome")
.Buttons(b =&gt;
{
b.Next();
});
})
)

Specifies a custom class that will be set on the step container element.

C#
public WizardStepBuilder ClassName(string value)
Parameters:valuestring

The value that configures the customclass.

Returns:

WizardStepBuilder

Example:
C#
@(Html.Kendo().Wizard()
.Name("wizard")
.Steps(steps =&gt;
{
steps.Add().ClassName("myClassName");
})
)

Sets the HTML content which the item should display.

C#
public WizardStepBuilder Content(Func<object, object> value)
Parameters:valueFunc<object, object>

The content wrapped in a regular HTML tag or text tag (Razor syntax).

Returns:

WizardStepBuilder

Example:
C#
@(Html.Kendo().Wizard()
.Name("wizard")
.Steps(steps =&gt; steps
.Add()
.Content(
@&lt;text&gt;
Some text
&lt;strong&gt; First Item Content&lt;/strong&gt;
&lt;/text&gt;
);
)
)

Specifies the HTML string content to be rendered in the step.

C#
public WizardStepBuilder Content(string value)
Parameters:valuestring

The value for Content

Returns:

WizardStepBuilder

Specifies the id of a DOM element, which content to be used as a content of the current step.

C#
public WizardStepBuilder ContentId(string value)
Parameters:valuestring

The value that configures the contentid.

Returns:

WizardStepBuilder

Example:
C#
@(Html.Kendo().Wizard()
.Name("wizard")
.Steps(steps =&gt;
{
steps.Add().ContentId("content");
})
)

Specifies an endpoint which the step content should be loaded from.

C#
public WizardStepBuilder ContentUrl(string value)
Parameters:valuestring

The value that configures the contenturl.

Returns:

WizardStepBuilder

Example:
C#
@(Html.Kendo().Wizard()
.Name("wizard")
.Steps(steps =&gt;
{
steps.Add().ContentUrl(Url.Content("~/shared/web/wizard/ajax/ajaxContent1.html"));
})
)

Specifies whether the step is enabled or not.

C#
public WizardStepBuilder Enabled(bool value)
Parameters:valuebool

The value that configures the enabled.

Returns:

WizardStepBuilder

Example:
C#
@(Html.Kendo().Wizard()
.Name("wizard")
.Steps(steps =&gt;
{
steps.Add().Enabled(true);
})
)

Specifies the Form that will be rendered as part of the Step's content

C#
public WizardStepBuilder Form(Action<FormBuilder<object>> configurator)
Parameters:configuratorAction<FormBuilder<object>>Returns:

WizardStepBuilder

Example:
C#
@(Html.Kendo().Wizard()
.Name("wizard")
.Steps(steps =&gt;
{
steps.Add().Title("My Title")
.Form(f =&gt; f
.Validatable(v =&gt;
{
v.ValidateOnBlur(true);
v.ValidationSummary(vs =&gt; vs.Enable(false));
})
.FormData(Model)
.Items(items =&gt;
{
items.Add().Field(p =&gt; p.AccountDetails.Username).Label(l =&gt; l.Text("Username:"));
items.Add().Field(p =&gt; p.AccountDetails.Email).Label(l =&gt; l.Text("Email:"));
items.Add().Field(p =&gt; p.AccountDetails.Password).Label(l =&gt; l.Text("Password:"));
})
);
})
)

Specifies the Stepper's step icon.

C#
public WizardStepBuilder Icon(string value)
Parameters:valuestring

The value that configures the icon.

Returns:

WizardStepBuilder

Example:
C#
@(Html.Kendo().Wizard()
.Name("wizard")
.Steps(steps =&gt;
{
steps.Add().Icon("k-i-home");
})
)
C#
public WizardStepBuilder IconTemplate(string value)
Parameters:valuestringReturns:

WizardStepBuilder

Sets the JavaScript function that returns the icon template for the Stepper's step.

C#
public WizardStepBuilder IconTemplateHandler(string value)
Parameters:valuestring

The JavaScript function name.

Returns:

WizardStepBuilder

Example:
C#
@(Html.Kendo().Wizard()
.Name("wizard")
.Steps(steps =&gt;
{
steps.Add().IconTemplateHandler("iconHandler");
})
)

Specifies the Stepper's step iconTemplateId.

C#
public WizardStepBuilder IconTemplateId(string value)
Parameters:valuestring

The value that configures the iconTemplateId.

Returns:

WizardStepBuilder

Example:
C#
@(Html.Kendo().Wizard()
.Name("wizard")
.Steps(steps =&gt;
{
steps.Add().IconTemplateId("homeIcon");
})
)

Specifies the Stepper's step iconTemplate.

C#
public WizardStepBuilder IconTemplateView(MvcHtmlString value)
Parameters:valueMvcHtmlString

The value that configures the iconTemplate.

Returns:

WizardStepBuilder

Example:
C#
@(Html.Kendo().Wizard()
.Name("wizard")
.Steps(steps =&gt;
{
steps.Add().IconTemplateView(Html.Partial("_IconTemplatePartial"));
})
)

Specifies whether the pager will be rendered on the current step or not.

C#
public WizardStepBuilder Pager(bool value)
Parameters:valuebool

The value that configures the pager.

Returns:

WizardStepBuilder

Example:
C#
@(Html.Kendo().Wizard()
.Name("wizard")
.Steps(steps =&gt;
{
steps.Add().Pager(true);
})
)

Specifies a title of the current step.

C#
public virtual WizardStepBuilder Title(string value)
Parameters:valuestring

The value that configures the title.

Returns:

WizardStepBuilder

Example:
C#
@(Html.Kendo().Wizard()
.Name("wizard")
.Steps(steps =&gt;
{
steps.Add().Title("My Title");
})
)