2

I'd like to customize HeaderTemplate of ValidationSummary control from Silverlight Toolkit and display localized Header. But I cant figure out how to display error counter right to header's text ...
Can anybody help me with this?

My current XAML code ...

<sdk:ValidationSummary Grid.Row="3">
<sdk:ValidationSummary.HeaderTemplate>
    <DataTemplate>
        <Grid Background="Red">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <TextBlock UseLayoutRounding="False"
                       Foreground="White"
                       Text="Editing Errors:" />
            <TextBlock UseLayoutRounding="True"
                       Foreground="White"
                       FontWeight="Bold"
                       Text="{Binding DisplayedErrors.Count}"
                       Grid.Column="1" />
        </Grid>
    </DataTemplate>
</sdk:ValidationSummary.HeaderTemplate>

Thanks in advance!

Matjaz Bravc
  • 189
  • 1
  • 12
  • Are any of the items in your grid displaying in the header? Is it only the DisplayedErrors.Count you're missing? – Kavet Kerek Nov 19 '10 at 16:16

2 Answers2

2

Yes, I'm missing only DisplayedErrors.Count! That's the problem!

Matjaz Bravc
  • 189
  • 1
  • 12
0

Remove "DisplayedErrors.Count" from the Text="{Binding DisplayedErrors.Count}" statement keeping only Text="{Binding}"

MMH
  • 675
  • 5
  • 18