wpf-devexpress-dot-xpf-dot-pivotgrid-dot-pivotgridfield-cea411f5.md
Gets or sets an image displayed within the field header in the Field List.
Namespace : DevExpress.Xpf.PivotGrid
Assembly : DevExpress.Xpf.PivotGrid.v25.2.dll
NuGet Package : DevExpress.Wpf.PivotGrid
public ImageSource TreeViewHeaderImage { get; set; }
Public Property TreeViewHeaderImage As ImageSource
| Type | Description |
|---|---|
| ImageSource |
A ImageSource object specifying the image displayed within a field header in the Field List.
|
The following example shows how to set the person.ico icon to the Sales Person field. The icon is located in the image folder of the current project.
<dxpg:PivotGridControl.Fields>
<dxpg:PivotGridField Name="fieldSalesPerson" Area="RowArea"
FieldName="ProductName" AreaIndex="1" DisplayFolder="Sales Person"
TreeViewHeaderImage="pack://application:,,,/image/person.ico"/>
</dxpg:PivotGridControl.Fields>
using System.Windows.Media.Imaging;
public MainWindow() {
// ...
BitmapImage logo = new BitmapImage();
logo.BeginInit();
logo.UriSource = new Uri("pack://application:,,,/image/person.ico");
logo.EndInit();
fieldSalesPerson.DisplayFolder = "Sales Person"
fieldSalesPerson.HeaderImage = logo;
}
See Also