Back to Devexpress

SwitchBuilder.Value(Nullable<Boolean>) Method

aspnetcore-devextreme-dot-aspnet-dot-mvc-dot-builders-dot-switchbuilder-dot-value-x28-system-dot-nullable-system-dot-boolean-x29.md

latest1.3 KB
Original Source

SwitchBuilder.Value(Nullable<Boolean>) Method

A Boolean value specifying whether the current switch state is 'On' or 'Off'. Mirrors the client-side value option.

Namespace : DevExtreme.AspNet.Mvc.Builders

Assembly : DevExtreme.AspNet.Core.dll

Declaration

csharp
public SwitchBuilder Value(
    bool? value
)

Parameters

NameTypeDescription
valueNullable<Boolean>

The option value.

|

Returns

TypeDescription
SwitchBuilder

A reference to this instance after the method is called.

|

Remarks

Use the following notation to set the option’s value:

cshtml
@(Html.DevExtreme().Switch()
    .Value(true)
)

See Also

SwitchBuilder Class

SwitchBuilder Members

DevExtreme.AspNet.Mvc.Builders Namespace