Hi,
I am trying to create a custom DataRow Template for a Card View. I am using an Expander, but the header doesn't show any data. Am I doing something wrong?
Thanks,
Wally
The Following is the DataCell and DataRow Templates:
<Style x:Key="CardViewDataCellStyle" TargetType="{x:Type xcdg:DataCell}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type xcdg:DataCell}">
<ContentPresenter
Content="{xcdg:CellContentBinding}"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate x:Name="CardViewDataRowTemplate" TargetType="{x:Type xcdg:DataRow}">
<Expander x:Name="PART_RowFocusRoot"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}">
<Expander.Header>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<xcdg:DataCell Grid.Row="0" Grid.Column="0" FieldName="Case" Style="{StaticResource CardViewDataCellStyle}"/>
<xcdg:DataCell Grid.Row="1" Grid.Column="0" FieldName="Debtor" Style="{StaticResource CardViewDataCellStyle}"/>
<xcdg:DataCell Grid.Row="0" Grid.Column="1" FieldName="Date" Style="{StaticResource CardViewDataCellStyle}"/>
<xcdg:DataCell Grid.Row="1" Grid.Column="1" FieldName="Time" Style="{StaticResource CardViewDataCellStyle}"/>
</Grid>
</Expander.Header>
<StackPanel x:Name="PART_CellsHost" Grid.IsSharedSizeScope="True" Margin="5" Orientation="Vertical"/>
</Expander>
</ControlTemplate>