Change PasswordBox Validation Template

2 posts, 0 answers
  1. Geoffrey
    Geoffrey avatar
    48 posts
    Member since:
    Mar 2013

    Posted 10 Dec 2015 Link to this post


    I try to change the Validation.ErrorTemplate of PasswordBox.

    1.<Style TargetType="PasswordBox" BasedOn="{StaticResource PasswordBoxStyle}">
    2.       <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ErrorTemplateStyle}" />

    But the two templates are displayed.

    Why ?

    PS : It works for other control like RadWatermarkTextBox but not for MS controls.

    Best regards,


  2. Masha
    Masha avatar
    355 posts

    Posted 11 Dec 2015 Link to this post

    Hello Geoffrey,

    Unfortunately, PasswordBox’s Password property is not a dependency property and you can not use Validation.ErrorTemplate like in RadWatermarkTextBox. Please take a look at the following discussion
    where you can find a workaround for this issue.

    I hope it helps.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top