Back to Devexpress

CardViewFormatConditionTopBottom.CardStyle Property

aspnet-devexpress-dot-web-dot-cardviewformatconditiontopbottom.md

latest2.7 KB
Original Source

CardViewFormatConditionTopBottom.CardStyle Property

Gets the style settings defining the custom conditional formatting applied to cards.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public CardViewCardStyle CardStyle { get; }
vb
Public ReadOnly Property CardStyle As CardViewCardStyle

Property Value

TypeDescription
CardViewCardStyle

A CardViewCardStyle object that contains the style settings.

|

Remarks

When the GridFormatConditionExpressionBase.Format property is set to Custom and the CardViewFormatConditionTopBottom.ApplyToCard property is set to true, use the CardStyle property to specify the style settings that are applied to a card whose cell’s value meets the condition specified by the GridFormatConditionTopBottom.Rule property.

Online Demo

Conditional Formatting

Example

csharp
{
...
    CardViewFormatConditionTopBottom Format3 = new CardViewFormatConditionTopBottom();
    Format3.FieldName = "UnitPrice";
    Format3.Format = GridConditionHighlightFormat.Custom;
    Format3.CardStyle.Border.BorderStyle = BorderStyle.Solid;
    Format3.CardStyle.Border.BorderWidth = 2;
    Format3.CardStyle.Border.BorderColor = Color.Olive;
    Format3.ApplyToCard = true;
    Format3.Rule = GridTopBottomRule.TopItems;
    Format3.Threshold = 10;
...
}

See Also

Conditional Formatting

Format

ApplyToCard

Rule

CardViewFormatConditionTopBottom Class

CardViewFormatConditionTopBottom Members

DevExpress.Web Namespace