0

In my window I have 2 tabs. One with the main informarion and the other one with an editable grid. When I click the save button the entire window gets validated and the controls with validation problems are highlighted in red. But if i change the tab to the one with the grid and get back to the one with the validation problems the controls are not highlighted anymore. Even if i click the save button again, and the validation happens, the controls never get highlighted again.

Here are the screen captures

enter image description here

enter image description here

enter image description here

snekkke
  • 441
  • 1
  • 5
  • 15

1 Answers1

2

it's a bit late, but today I had the same situation and found the solution. You have to add a AdornerDecorator inside the TabItem:

<TabItem Header="Foo">
        <AdornerDecorator>
           //more content
        </AdornerDecorator>
</TabItem>

I have found it in a more general question: TextBox with validation loses ErrorTemplate on tab change

Greetings

Community
  • 1
  • 1