MahApps.Metro: Change the Validation Error Position

The Validation Error Popup is blocking the Description of my Texbox since it’s on the right side by default. Is it there a way to change it to the left?

Here’s my situation:

captura_de_tela_082615_053528_pm

And this is the original Form:

captura_de_tela_082615_053554_pm

So when the window opens, the user can’t see there is a field called “Name”, just something that can’t be blank, but he can’t know what he’s supposed to type.

I tried a watermark instead, but I didn’t like it for this particular application, I rather a Form style, as it is.


EDIT :

I tried this code in my Resources.xaml:

<Style TargetType="{x:Type mahapps:CustomValidationPopup}">        
    <Setter Property="Placement" Value="Left" />
</Style>

But it didn’t make any difference.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 18 (12 by maintainers)

Commits related to this issue

Most upvoted comments

Could you please paste the full code that is showing how we can position the valisation popup. Is it possible to show it below the textbox.

@feinstein so, please try the latest alpha. there was something changed. you can now inherit from a base style for the CustomValidationPopup.

    <Style x:Key="MetroValidationPopup"
           TargetType="{x:Type controls:CustomValidationPopup}">
        <Setter Property="HorizontalAlignment"
                Value="Right" />
        <Setter Property="HorizontalOffset"
                Value="0" />
        <Setter Property="VerticalOffset"
                Value="0" />
        <Setter Property="PopupAnimation"
                Value="Fade" />
        <Setter Property="Placement"
                Value="Right" />
    </Style>