views:

103

answers:

1

I have a WPF page with validation rules. This page has 2 grids - 1 that's shown by default, and another that can be toggled to show via an animation (a button is pressed, and the second grid's height is animated to show over top of the 1st grid, and the 1st grid is disabled).

My problem is this: I have validation rules on the first grid, and when one of them fails, a red border appears around the control (as it should). But when the second grid is overlayed on top of the first, I can still see the red border from the first grid, even though I set the first grid's Visibility to Hidden.

I've tried setting the Panel.ZIndex property on both so that I'm sure the second grid is showing up in front of the first. Any ideas?!

+1  A: 

This Question contained a perfect solution to my problem! No more artifacts!

Pwninstein