
ColorPicker
Select color to use
Set the color value by setting the Value
property
Demo
Set the color value by setting the Value
property
Demo
Set Value='@Value'
to initialize the default value
Set the color value by setting the Value
property
Demo
Disable this component by setting the IsDisabled
property
Demo
Built in ValidateForm
to use
Demo
Attributes
@page "/colorpickers"
@inject IStringLocalizer<ColorPickers> Localizer
<h3>ColorPicker</h3>
<h4>Select color to use</h4>
<DemoBlock Title="Basic Usage" Introduction="Set the color value by setting the <code>Value</code> property" Name="Normal" Demo="typeof(Demos.ColorPicker.ColorPickerNormal)" />
<DemoBlock Title="Set Initial Value" Introduction="Set the color value by setting the <code>Value</code> property" Name="Value" Demo="typeof(Demos.ColorPicker.ColorPickerValue)">
<p>Set <code>Value='@Value'</code> to initialize the default value</p>
</DemoBlock>
<DemoBlock Title="Two-way binding" Introduction="Set the color value by setting the <code>Value</code> property" Name="BindValue" Demo="typeof(Demos.ColorPicker.ColorPickerBindValue)" />
<DemoBlock Title="Disabled" Introduction="Disable this component by setting the <code>IsDisabled</code> property" Name="Disabled" Demo="typeof(Demos.ColorPicker.ColorPickerDisabled)" />
<DemoBlock Title="Used in the verification form" Introduction="Built in <code>ValidateForm</code> to use" Name="ValidateForm" Demo="typeof(Demos.ColorPicker.ColorPickerValidateForm)" />
<AttributeTable Items="@GetAttributes()" />
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Website: https://www.blazor.zone or https://argozhang.github.io/
namespace BootstrapBlazor.Shared.Samples;
/// <summary>
/// ColorPickers
/// </summary>
public partial class ColorPickers
{
private IEnumerable<AttributeItem> GetAttributes() => new AttributeItem[]
{
new AttributeItem()
{
Name = "OnValueChanged",
Description = Localizer["Event1"],
Type = "Func<string, Task>",
ValueList = "",
DefaultValue = ""
}
};
}