Table of Contents

Class NullSwitch

Namespace
BootstrapBlazor.Components
Assembly
BootstrapBlazor.dll

可为空布尔值组件

public class NullSwitch : ToggleBase<bool?>, IComponent, IHandleAfterRender, IHandleEvent, IAsyncDisposable, IValidateComponent
Inheritance
NullSwitch
Implements
Inherited Members
Extension Methods

Constructors

NullSwitch()

public NullSwitch()

Properties

ComponentValue

获得/设置 组件 Value 值

protected bool ComponentValue { get; }

Property Value

bool

DefaultValueWhenNull

获得/设置 绑定值为空时的默认值 默认为 false

[Parameter]
public bool DefaultValueWhenNull { get; set; }

Property Value

bool

Height

获得/设置 控件高度默认 20px

[Parameter]
public int Height { get; set; }

Property Value

int

OffColor

获得/设置 关颜色

[Parameter]
public Color OffColor { get; set; }

Property Value

Color

OffInnerText

获得/设置 组件 Off 时内置显示文本

[Parameter]
public string? OffInnerText { get; set; }

Property Value

string

OnColor

获得/设置 开颜色

[Parameter]
public Color OnColor { get; set; }

Property Value

Color

OnInnerText

获得/设置 组件 On 时内置显示文本

[Parameter]
public string? OnInnerText { get; set; }

Property Value

string

ShowInnerText

获得/设置 是否显示内置文字 默认 false 显示

[Parameter]
public bool ShowInnerText { get; set; }

Property Value

bool

StyleName

获得 Style 集合

protected override string? StyleName { get; }

Property Value

string

Width

获得/设置 组件宽度 默认 40

[Parameter]
public override int Width { get; set; }

Property Value

int

Methods

BuildRenderTree(RenderTreeBuilder)

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

OnInitialized()

OnInitialized 方法

protected override void OnInitialized()