Back to Devexpress

PivotGridField.HeaderImage Property

wpf-devexpress-dot-xpf-dot-pivotgrid-dot-pivotgridfield-dd4f769e.md

latest1.9 KB
Original Source

PivotGridField.HeaderImage Property

Gets or sets an image displayed within the Pivot Grid’s field header. This is a dependency property.

Namespace : DevExpress.Xpf.PivotGrid

Assembly : DevExpress.Xpf.PivotGrid.v25.2.dll

NuGet Package : DevExpress.Wpf.PivotGrid

Declaration

csharp
public ImageSource HeaderImage { get; set; }
vb
Public Property HeaderImage As ImageSource

Property Value

TypeDescription
ImageSource

A System.Windows.Media.ImageSource object specifying the image displayed within the Pivot Grid’s field header.

|

Remarks

The following example shows how to set the product.ico icon to the Product Name field. This icon is located in the image folder of the current project.

xaml
<dxpg:PivotGridControl.Fields>
    <dxpg:PivotGridField Name="fieldProduct" Area="RowArea" FieldName="ProductName" 
        AreaIndex="1" HeaderImage="pack://application:,,,/image/product.ico"/>
</dxpg:PivotGridControl.Fields>
csharp
using System.Windows.Media.Imaging;

public MainWindow() {
    // ...
    BitmapImage logo = new BitmapImage();
    logo.BeginInit();
    logo.UriSource = new Uri("pack://application:,,,/image/product.ico");
    logo.EndInit();

    fieldProduct.HeaderImage = logo;
}

See Also

PivotGridField Class

PivotGridField Members

DevExpress.Xpf.PivotGrid Namespace