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

GradientFillStyle Class

The fill style that used the gradient to color a surface.

Namespace: DevExpress.Xpf.Charts

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

NuGet Package: DevExpress.Wpf.Charts

#Declaration

public class GradientFillStyle :
    FillStyleBase

#Remarks

This fill style colors surface points depending on their value. The following image shows this fill style in action.

GradientFillStyle-Example

#Example

This example demonstrates how to colorize a surface with a gradient. It uses the following classes and properties.

Class or Property Description
Series3DBase.View The view of the series.
SurfaceSeriesView The Surface series view.
SurfaceSeriesView.FillStyle The fill style of the front side of a surface.
GradientFillStyle The fill style that used the gradient to colorize a surface.
GradientFillStyle.ColorStops The collection of color stops defining a gradent.
ColorStop Describes the location and color of a transition point in a gradient.
<dxc:Series3DStorage>
    <dxc:Series3D DisplayName="Height Map">
        <dxc:SeriesPoint3DMatrixAdapter XArguments="{Binding ImageData.XArguments}" 
                                        YArguments="{Binding ImageData.YArguments}" 
                                        Values="{Binding ImageData.Values}"/>
        <dxc:Series3D.View>
            <dxc:SurfaceSeriesView>
                <dxc:SurfaceSeriesView.FillStyle>
                    <dxc:GradientFillStyle LegendTextPattern="{}{V}">
                        <dxc:GradientFillStyle.ColorStops>
                            <dxc:ColorStop Color="#FF4472C4" Offset="0%"/>
                            <dxc:ColorStop Color="#FF5B9BD5" Offset="25%"/>
                            <dxc:ColorStop Color="#FF70AD47" Offset="50%"/>
                            <dxc:ColorStop Color="#FFFFC000" Offset="75%"/>
                            <dxc:ColorStop Color="#FFED7D31" Offset="100%"/>
                        </dxc:GradientFillStyle.ColorStops>
                    </dxc:GradientFillStyle>
                </dxc:SurfaceSeriesView.FillStyle>
            </dxc:SurfaceSeriesView>
        </dxc:Series3D.View>
    </dxc:Series3D>
</dxc:Series3DStorage>
See Also