Skip to main content
All docs
V25.1
  • ChartCommandsBase.ChangePaletteCommand Property

    Specifies the command that applies a palette to the chart.

    Namespace: DevExpress.Xpf.Charts

    Assembly: DevExpress.Xpf.Charts.v25.1.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