Class
TelerikColorPicker

The class for the Telerik ColorPicker component.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

cs-api-definition
public class TelerikColorPicker : ColorEditorBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentTelerikInputBase<string>ColorEditorBaseTelerikColorPicker

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members ColorEditorBase.OnParametersSetAsync()ColorEditorBase.ShowClearButtonColorEditorBase.ShowPreviewColorEditorBase.ShowButtonsColorEditorBase.ValueFormatColorEditorBase.ViewColorEditorBase.ViewChangedColorEditorBase.OnBlurTelerikInputBase<string>.SetParametersAsync(ParameterView)TelerikInputBase<string>.OnInitializedAsync()TelerikInputBase<string>.Dispose()TelerikInputBase<string>.FocusAsync()TelerikInputBase<string>.CascadedEditContextTelerikInputBase<string>.FloatingLabelTelerikInputBase<string>.IdTelerikInputBase<string>.EnabledTelerikInputBase<string>.TabIndexTelerikInputBase<string>.ValueExpressionTelerikInputBase<string>.ValueChangedTelerikInputBase<string>.ValueTelerikInputBase<string>.OnChangeTelerikInputBase<string>.AriaLabelTelerikInputBase<string>.AriaLabelledByTelerikInputBase<string>.AriaDescribedByTelerikInputBase<string>.ValidateOnBaseComponent.ShouldRender()BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.OnInitialized()ComponentBase.OnParametersSet()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)

Constructors

TelerikColorPicker()

Declaration

cs-api-definition
public TelerikColorPicker()

Properties

ColorPickerViews

The ColorPicker popup can display different views. They allow users to select a color from an interface that matches their preferences. The supported views are: Telerik.Blazor.Components.ColorGradient and Telerik.Blazor.Components.ColorPalette. By default, both views are enabled and the gradient view is displayed first.

Declaration

cs-api-definition
[Parameter]
public RenderFragment ColorPickerViews { get; set; }

Property Value

RenderFragment

FillMode

Specifies the fill mode of the ColorPicker. Default value is Solid.

Declaration

cs-api-definition
[Parameter]
public string FillMode { get; set; }

Property Value

string

Icon

Specifies the icon rendered in the picker value. You can use either a predefined Telerik Icon or a custom one. Refer to Icons - Documentation for more information on how icons work.

Declaration

cs-api-definition
[Parameter]
public object Icon { get; set; }

Property Value

object

OnClose

Defines the OnClose Event which is fired before the popup of the ColorPicker is closed.

Declaration

cs-api-definition
[Parameter]
public EventCallback<ColorPickerCloseEventArgs> OnClose { get; set; }

Property Value

EventCallback<ColorPickerCloseEventArgs>

OnOpen

Defines the OnOpen Event which is fired before the popup of the ColorPicker is opened.

Declaration

cs-api-definition
[Parameter]
public EventCallback<ColorPickerOpenEventArgs> OnOpen { get; set; }

Property Value

EventCallback<ColorPickerOpenEventArgs>

PopupClass

Specifies a popup class to be rendered on the popup.

Declaration

cs-api-definition
[Parameter]
public string PopupClass { get; set; }

Property Value

string

Rounded

Specifies the roundness of the ColorPicker. Default value is Medium.

Declaration

cs-api-definition
[Parameter]
public string Rounded { get; set; }

Property Value

string

Size

Specifies the Size of the ColorPicker. Default value is Medium.

Declaration

cs-api-definition
[Parameter]
public string Size { get; set; }

Property Value

string

Title

Specifies a title attribute to be rendered on the chooser button.

Declaration

cs-api-definition
[Parameter]
public string Title { get; set; }

Property Value

string

ValueTemplate

Defines the RenderFragment to be displayed in the chooser button instead of the default colored square.

Declaration

cs-api-definition
[Parameter]
public RenderFragment ValueTemplate { get; set; }

Property Value

RenderFragment

Methods

BuildRenderTree(RenderTreeBuilder)

Declaration

cs-api-definition
protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder

RenderTreeBuilder

Overrides ComponentBase.BuildRenderTree(RenderTreeBuilder)

Close()

Closes the popup of the component.

Declaration

cs-api-definition
public void Close()

OnAfterRenderAsync(bool)

Declaration

cs-api-definition
protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender

bool

Returns

Task

Overrides BaseComponent.OnAfterRenderAsync(bool)

Open()

Opens the popup of the component.

Declaration

cs-api-definition
public void Open()