Back to Devexpress

DashboardControlBase.GridItemStyleSelector Property

dashboard-devexpress-dot-dashboardwpf-dot-dashboardcontrolbase-4f4b24a2.md

latest3.2 KB
Original Source

DashboardControlBase.GridItemStyleSelector Property

Gets or sets an object that returns a style based on custom logic. This is a dependency property.

Namespace : DevExpress.DashboardWpf

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

NuGet Package : DevExpress.Wpf.Dashboard

Declaration

csharp
public StyleSelector GridItemStyleSelector { get; set; }
vb
Public Property GridItemStyleSelector As StyleSelector

Property Value

TypeDescription
StyleSelector

An object that applies styles based on custom logic.

|

Remarks

Use the GridItemStyleSelector property to apply a style to the GridItemStyle property based on custom logic.

To accomplish this, take the following steps:

  • Implement a class that descends from the StyleSelector class.
  • Implement the SelectStyle method that returns the style based on custom logic.
  • Instantiate the class and assign it to the GridItemStyleSelector property.

The style specified by the GridItemStyleSelector property has priority over the style specified by the GridItemStyle property. If the GridItemStyleSelector property is null , the GridItemStyle property is in effect.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GridItemStyleSelector property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-dashboard-how-to-embed-devexpress-control/CS/GanttSample/Window.xaml#L46

xml
ObjectDataSourceLoadingBehavior="LoadAsIs"
                         GridItemStyleSelector="{StaticResource ganttStyleSelector}">
</dxdash:DashboardControl>

See Also

How to Embed a DevExpress Control in the WPF Dashboard

DashboardControlBase Class

DashboardControlBase Members

DevExpress.DashboardWpf Namespace