BUG: Expander Control & Validation Errors Showing Thru

Sep 2, 2009 at 9:12 PM
Edited Sep 3, 2009 at 3:34 AM

I have an expander control that displays a grid control which has several textboxes with validation errors. Consequently their borders are red.  When I collapse the expander control, the red borders are still visible so now I have big red boxes showing through.  I have tried varying the opacity of the expander which has no affect on the drawing of the red border.

Interestingly, I have other expander controls that house WPF Datagrids. When their cells have validation erros and their expander controls are collapsed, I do not have an issue. 

I tried to attach a screen shot, but was unable to paste it as a word or text document.  Are there any known issues/workarounds for this?

I am using the WPF Toolkit from June 2009...

Sep 3, 2009 at 4:31 AM

I figured it out. This is not a bug. When you have controls such as textboxes that can have validation errors (and therefore a red border), if they live in an expander control or a tab control, you need to use <AdornerDecorator>

Here is the article: http://karlshifflett.wordpress.com/2008/02/19/wpf-validation-errors-disappear-inside-tabcontrol-when-switching-tabitems/