Open cbordeman opened 4 years ago
Also, only the currently selected tab updates at all. Other tabs don't even update when selected.
This does not sound good, thanks for reporting. I'll try to repro it in a UI-test.
Also, I'm surrounding the contents of my tabitemex's with <AdornerDecorator>...</AdornerDecorator>
so that the adorners don't disappear. This is a well known trick since TabControl seems to delete the validation adorners. I'm having no problem with that, though.
My mistake, I meant to say other tabs DO update, but only when selected.
I had no luck with creating a repro UI test.
I used this xaml and this test code
When the test runs it does the following:
I did some chores and released a new version https://www.nuget.org/packages/Gu.Wpf.ValidationScope/0.2.2
Please update to the latest in case the bug you reported was already fixed but not released.
I have isolated the bug further. It only occurs when there's an items control on the hidden tab. I have two solutions: 1) In my case the items control always contained the two same items, so I was able to remove the items control. 2) Select the tab in code when the window opens, then reselect the tab I was on immediately. When validation occurse, I can call InvalidateArrange() on the hidden tab's top level content, which usually works.
Give me a lot of time and I'll come up with a repro myself.
I have a usercontrol with this on the UserControl:
On the UserControl I have a TabControl. Each TabItemEx (adds Counter, a string dp) has the following:
CustomerSv is a
ScrollViewer
inside theTabItemEx
at the top level that contains all myu controls.When I press OK, validation happens in my view model and the controls turn red as expected. However, Counter only ever shows "0" or "1". There are lots of invalid controls so the number should be > 1.
As I fix/update field values, the number goes to "0" properly, but never goes higher than "1".