DxColorPalette.ValueChanged Event
Allows you to respond to the Color Palette’s selected color changes.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
Declaration
[Parameter]
public EventCallback<string> ValueChanged { get; set; }
Parameters
Type | Description |
---|---|
String | The new color. |
Remarks
The ValueChanged
event fires when users change color selection. The following code handles the ValueChanged
event:
<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