Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6825079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:58:46+00:00 2026-05-26T21:58:46+00:00

We display our Errors via an Validation.ValidationAdornerSite in the StatusBar. With the usage of

  • 0

We display our Errors via an Validation.ValidationAdornerSite in the StatusBar. With the usage of the ValidationAdornerSite, it seems that wpf disables the Validation.ErrorTemplate.

What can I do to achieve both the display of the ErrorTemplate? We currently have a compromise where we only display stuff at the ValidationAdornersite by setting it on MouseOver via Trigger, so that the ErrorTemplate is displayed as long as the mouse is outside the control.

 <Style x:Key="ValidationStyle">
    <Setter Property="Validation.ErrorTemplate"
            Value="{StaticResource Default_ErrorTemplate}" />
    <Style.Triggers>
        <Trigger Property="UIElement.IsMouseOver"
                 Value="True">
            <Setter Property="Validation.ValidationAdornerSite"
                    Value="{Binding ValidationAdornerSite,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}" />
        </Trigger>

        <Trigger Property="Validation.HasError"
                 Value="true">
            <Setter Property="FrameworkElement.ToolTip"
                    Value="{Binding RelativeSource={x:Static RelativeSource.Self},
                    Path=(Validation.Errors)[0].ErrorContent}" />
        </Trigger>
    </Style.Triggers>
</Style>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:58:47+00:00Added an answer on May 26, 2026 at 9:58 pm

    After looking with ILSpy how the Validation has been implemented, I have come to the conclusion that this behavior cannot be altered.

    It is much easier to do something similar like ValidationAdornerSite and ValidationAdornerSiteFor does. Define two attached dependency props with similar behaviour. Then you use it instead of the standard adonersite props:

     <Setter Property="gw:FormValidation.ValidationSite"
                        Value="{Binding ValidationAdornerSite,RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}" />
    

    ………………………….

     <TextBlock x:Name="PART_ValidationAdornerSite"
                           HorizontalAlignment="Center"
                           Text="{Binding RelativeSource={RelativeSource Self}, Path=(gw:FormValidation.ValidationSiteFor).(Validation.Errors)[0].ErrorContent, NotifyOnTargetUpdated=True}"
                           TargetUpdated="PART_ValidationAdornerSite_TargetUpdated"
                           TextBlock.Foreground="Red"/>
    

    ………………………….

    this.ValidationAdornerSite = this.PART_ValidationAdornerSite;
    

    this is a Window holding a dp “ValidationAdornerSite”. Beware that this solution can be simplified, but it fits my need because my validated controls are within modules (PRISM) that aren’t aware of the window (the shell).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our server side validation (via data annotations) is working great and posts the errors
I am working on a display screen for our office, and I can't seem
I have a mySQL database that tracks our projects and drives our website's display
I'd like to display records from our database in a listview - but retrieves
I'm creating a library of display objects for our application. They render the html
I would like to display an exchange calendar on our intranet using SharePoint or
I've been asked to display the 'correct' time on our website which I frankly
On one of our Java application screens, we want to display data loaded from
I'm just starting to work on a logging library that everyone can use to
We have our own web server hosting our website that is open to the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.