Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxColorPalette.Value Property

Gets or sets the selected color value.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[DefaultValue(null)]
[Parameter]
public string Value { get; set; }

#Property Value

Type Default Description
String null

The selected color.

#Remarks

Use the Value property to specify a selected color. To respond to the selected item change, handle the ValueChanged event.

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

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

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

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

You can also use the @bind attribute for the Value property to implement two-way data binding.

Razor
<DxColorPalette @bind-Value="@Value"/>

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

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

Color Palette Overview

See Also