CheckboxAttribute Class

CheckboxAttribute Class

Uses a checkbox editor for this property in the Redakt backoffice.

[AttributeUsage(AttributeTargets.Property)]
public sealed class CheckboxAttribute: Attribute, IPropertyModelAttribute

Inheritance  Attribute CheckboxAttribute

Implements  IPropertyModelAttribute

Properties

Name Description
CheckedValue Sets the value to be saved when the checkbox is checked. Must be convertable to the property type. Defaults to true (bool), 1 (numeric types) or "on" (string).
Label Sets the checkbox label.
UncheckedValue Sets the value to be saved when the checkbox is unchecked. Must be convertable to the property type. Defaults to false (bool), 0 (numeric types) or "off" (string).

Methods

Name Description
Apply(PropertyDefinition)