Problem with validation using Conductor<T>.Collection.OneActive

Nov 9, 2010 at 10:43 PM

Hi,

First of all thanks for such a nice framework, it is a really great piece of code. I am using it with pleasure. Congrats.

During some my day to day development i have encountered some problems using Conductor<IScreen>.OneActive and applying IDataErrorInfo. For such "child" ViewModels using Screen as a base model. For the first time (first activation of screen) the validation works without any problem but after i change my tab to other and then get back to previous one with the validation, all the red borders disappear. Validation still works (property this[string columnName hits) but without needed graphical effect. Any thoughts?

 

.Collection.OneActive
Coordinator
Nov 10, 2010 at 2:52 AM

Would you be willing to create a bare-minimum reproduction of the issue and send the solution to me in an email? That would really help me find the bug or make a recommendation to you. You can feel free to send it to robertheisenberg at hotmail dot com

Nov 30, 2010 at 12:22 PM
EisenbergEffect wrote:

Would you be willing to create a bare-minimum reproduction of the issue and send the solution to me in an email? That would really help me find the bug or make a recommendation to you. You can feel free to send it to robertheisenberg at hotmail dot com

Has an example been provided Rob? 

If not, I am having exactly the same issue and can provide one for you.

May 9, 2011 at 9:22 PM
Edited May 9, 2011 at 9:22 PM

Any solution for this issue? Having they same... can also provide some code if needed.

Coordinator
May 9, 2011 at 9:48 PM

Could it possibly be related to this: http://karlshifflett.wordpress.com/2008/02/19/wpf-validation-errors-disappear-inside-tabcontrol-when-switching-tabitems/

May 10, 2011 at 6:00 AM

We once had this issue as well (the one Rob linked).  We have a general workaround, but it works in our situation because in our case we needed to template the ContentControl immediately inside each tab.  In that case, in the ControlTemplate, we simply wrap the ContentPresenter with an AdornerDecorator.

I would definitely be interested if anyone gets a general working solution for the more practical (non-templated) case.

May 10, 2011 at 6:24 AM

Adding a AdornerDecorator solved the issue... but i don´t understand this :) 

Sep 13, 2013 at 12:43 AM
To anybody stuck on this... I spent a solid few hours hung up on this. Here are the solutions I had that worked.
  1. Manually define your TabItems and wrap the contents with an AdornerDecorator, or
  2. Follow RobiVee's example on this WPF bug report page. https://connect.microsoft.com/VisualStudio/feedback/details/295933/tabcontrol-doesnt-display-validation-error-information-correctly-when-switching-tabs-back-and-forth
Hope that helps somebody!