Back to Devexpress

DashboardState.Items Property

dashboard-devexpress-dot-dashboardcommon-dot-dashboardstate-f8940173.md

latest3.7 KB
Original Source

DashboardState.Items Property

Provides access to states of individual dashboard items displayed in the dashboard.

Namespace : DevExpress.DashboardCommon

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

NuGet Package : DevExpress.Dashboard.Core

Declaration

csharp
public List<DashboardItemState> Items { get; set; }
vb
Public Property Items As List(Of DashboardItemState)

Property Value

TypeDescription
List<DashboardItemState>

A collection of DashboardItemState objects that are states of individual dashboard items.

|

Remarks

The following code snippet shows how to add a state of the RangeFilter dashboard item to the entire dashboard state (DashboardState):

csharp
public DashboardState CreateDashboardState() {
  DashboardState state = new DashboardState();
  state.Items.Add(new DashboardItemState("rangeFilterDashboardItem1")
  {
      RangeFilterState = new RangeFilterState(new RangeFilterSelection(new DateTime(2015, 1, 1), new DateTime(2017, 1, 1)))
  });
return state;
}
vb
Public Function CreateDashboardState() As DashboardState
  Dim state As New DashboardState()
  state.Items.Add(New DashboardItemState("rangeFilterDashboardItem1") With {.RangeFilterState = New RangeFilterState(New RangeFilterSelection(New DateTime(2015, 1, 1), New DateTime(2017, 1, 1)))})
Return state
End Function

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Items 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-viewer-DashboardStateChanged-event/CS/WPF-DashboardStateChanged-Event/MainWindow.xaml.cs#L20

csharp
var message = string.Empty;
foreach(DashboardItemState itemState in newState.Items) {
    var item = dashboardControl1.Dashboard.Items[itemState.ItemName];

wpf-dashboard-viewer-DashboardStateChanged-event/VB/WPF-DashboardStateChanged-Event/MainWindow.xaml.vb#L22

vb
Dim message = String.Empty
For Each itemState As DashboardItemState In newState.Items
    Dim item = Me.dashboardControl1.Dashboard.Items(itemState.ItemName)

See Also

DashboardState Class

DashboardState Members

DevExpress.DashboardCommon Namespace