Back to Devexpress

DxColorPalette.ValueChanged Event

blazor-devexpress-dot-blazor-dot-dxcolorpalette-8624c92b.md

latest1.4 KB
Original Source

DxColorPalette.ValueChanged Event

Allows you to respond to the Color Palette’s selected color changes.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public EventCallback<string> ValueChanged { get; set; }

Parameters

TypeDescription
String

The new color.

|

Remarks

The ValueChanged event fires when users change color selection. The following code handles the ValueChanged event:

razor
<DxColorPalette Value="@Value" ValueChanged="OnValueChanged"></DxColorPalette>

<p><b>Selected value:</b> @Value</p>

@code {
    string Value { get; set; } = "#5BCA35";

    void OnValueChanged(string newValue) {
        Value = newValue;
        // ...
    }
}

The ValueChanged event is handled automatically when you use two-way data binding for the Value property (@bind-Value).

See Also

DxColorPalette Class

DxColorPalette Members

DevExpress.Blazor Namespace