How to customize HeaderTemplate of ValidationSummary Silverlight control?

Posted by BravcM on Stack Overflow See other posts from Stack Overflow or by BravcM
Published on 2010-11-19T12:16:06Z Indexed on 2011/02/14 7:25 UTC
Read the original article Hit count: 336

Hello,

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!

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about validation