Table of Contents

Class Switch

Namespace
BootstrapBlazor.Components
Assembly
BootstrapBlazor.dll
public class Switch : ToggleBase<bool>, IComponent, IHandleAfterRender, IHandleEvent, IAsyncDisposable, IValidateComponent
Inheritance
Switch
Implements
Inherited Members
Extension Methods

Constructors

Switch()

public Switch()

Properties

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()