DashboardViewModelBase Class
Namespace: DevExpress.DashboardWpf
Assembly:
DevExpress.Dashboard.v24.2.Wpf.dll
Declaration
public class DashboardViewModelBase :
ViewModelBase
Public Class DashboardViewModelBase
Inherits ViewModelBase
The following code snippet shows how to access to the Chart item’s template and style:
//...
IDashboardControlProvider provider = (IDashboardControlProvider)values[1];
ChartDashboardItem chartItem = provider.Dashboard.Items[itemName] as ChartDashboardItem;
//...
'...
Dim provider As IDashboardControlProvider = CType(values(1), IDashboardControlProvider)
Dim chartItem As ChartDashboardItem = TryCast(provider.Dashboard.Items(itemName), ChartDashboardItem)
'...
<dxc:ChartControl Style="{Binding Path=(dxdash:DashboardLayoutItem.ViewStyle), RelativeSource={RelativeSource TemplatedParent}}">
//...
<MultiBinding Converter="{StaticResource ConstantLinesConverter}">
<Binding RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType={x:Type dxc:ChartControl}}" Path="DataContext.DashboardItemName"/>
<Binding RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType={x:Type dxc:ChartControl}}" Path="DataContext.DashboardControlProvider"/>
</MultiBinding>
//...
</dxc:ChartControl>
//...
<dxdash:DashboardControl x:Name="dashboardControl1">
<dxdash:DashboardControl.ChartItemStyle>
<Style TargetType="dxdash:ChartDashboardLayoutItem">
<Setter Property="ContentTemplate" Value="{StaticResource chartTemplate}" />
</Style>
</dxdash:DashboardControl.ChartItemStyle>
</dxdash:DashboardControl>
See Also