Back to Devexpress

CardView.CardStyle Property

wpf-devexpress-dot-xpf-dot-grid-dot-cardview.md

latest2.5 KB
Original Source

CardView.CardStyle Property

Gets or sets a card’s style.

Namespace : DevExpress.Xpf.Grid

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public Style CardStyle { get; set; }
vb
Public Property CardStyle As Style

Property Value

TypeDescription
Style

A Style object that represents a card’s style.

|

Remarks

Target Type : ContentControl

The following code sample demonstrates how to use the CardStyle property to display card tooltips:

xaml
<dxg:CardView.CardStyle>
    <Style TargetType="ContentControl">
        <Setter Property="ToolTip">
            <Setter.Value>
                <ToolTip>
                    <StackPanel>
                        <TextBlock>
                            <Run Text="Unit Price:" FontWeight="Bold"/>
                            <Run Text="{Binding Row.UnitPrice, StringFormat=c}"/>
                        </TextBlock>
                        <TextBlock>
                            <Run Text="Quantity:" FontWeight="Bold"/>
                            <Run Text="{Binding Row.Quantity}"/>
                        </TextBlock>
                        <TextBlock>
                            <Run Text="Total:" FontWeight="Bold"/>
                            <Run Text="{Binding DataContext.Total, StringFormat=c}"/>
                        </TextBlock>
                    </StackPanel>
                </ToolTip>
            </Setter.Value>
        </Setter>
    </Style>
</dxg:CardView.CardStyle>

Refer to the following help topic for more information: Card Settings.

See Also

CardView Class

CardView Members

DevExpress.Xpf.Grid Namespace