Skip to main content

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

ChartCommandsBase.ChangePaletteCommand Property

Specifies the command that applies a palette to the chart.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v24.2.dll

NuGet Package: DevExpress.Wpf.Charts

#Declaration

public ICommand<object> ChangePaletteCommand { get; set; }

#Property Value

Type Description
ICommand<Object>

An object that defines a command.

#Remarks

The following code shows how to use the ChangePaletteCommand to change the chart palette:

<dxc:ChartControl x:Name="chart">
    <!--...-->
</dxc:ChartControl>
<dx:SimpleButton VerticalAlignment="Bottom" Width="200" Height="20" Content="Apply Red Violet Palette" 
                      Command="{Binding Commands.ChangePaletteCommand, ElementName=chart}">
    <dx:SimpleButton.CommandParameter>
        <dxc:RedVioletPalette />
    </dx:SimpleButton.CommandParameter>
</dx:SimpleButton>

Alternatively, you can execute the ChangePaletteCommand in code-behind:

chart.Commands.ChangePaletteCommand.Execute(new RedVioletPalette());
See Also