All docs
V20.2
20.2
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

CardFormatRuleLayoutElement.CreateDimensionElement(String) Method

Creates a dimension layout element to which a format rule applies.

Namespace: DevExpress.DashboardCommon

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

Declaration

public static CardFormatRuleLayoutElement CreateDimensionElement(
    string dimensionId
)
Public Shared Function CreateDimensionElement(
    dimensionId As String
) As CardFormatRuleLayoutElement

Parameters

Name Type Description
dimensionId String

The dimension layout element's identifier.

Returns

Type Description
CardFormatRuleLayoutElement

The card's dimension layout element.

Remarks

The following example shows how apply the Value format rule to cards whose actual value is greater than the set condition value. The rule applies the green check icon to the card's dimension layout element. The CreateDimensionElement method uses the element's unique ID to obtain the dimension layout element.

using System.Windows.Forms;
using DevExpress.DashboardCommon;

CardDashboardItem cardItem = (CardDashboardItem)dashboardDesigner1.Dashboard.Items["cardDashboardItem1"];

CardItemDeltaFormatRule iconRule = new CardItemDeltaFormatRule();
iconRule.DeltaValueType = DeltaValueType.ActualValue;
iconRule.Card = cardItem.Cards[0];
FormatConditionValue valueCondition2 = new FormatConditionValue(DashboardFormatCondition.Greater, 1000000);
valueCondition2.StyleSettings = new IconSettings(FormatConditionIconType.IndicatorGreenCheck);
iconRule.Condition = valueCondition2;
var dimensionId = cardItem.SeriesDimensions[0].UniqueId;
CardFormatRuleLayoutElement dimensionLayoutElement = CardFormatRuleLayoutElement.CreateDimensionElement(dimensionId);
iconRule.ApplyToLayoutElement = dimensionLayoutElement;
cardItem.FormatRules.Add(iconRule);
See Also