This is a migrated thread and some comments may be shown as answers.

How to customize HeaderTemplate of ValidationSummary control?

0 Answers 65 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sandi Markon
Top achievements
Rank 1
Sandi Markon asked on 19 Nov 2010, 12:05 PM
Hello,

I'd like to customize HeaderTemplate of ValidationSummary control 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>
</sdk:ValidationSummary>

Thanks in advance!

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
Sandi Markon
Top achievements
Rank 1
Share this question
or