Mark Carpenter
Mark Carpenter

Reputation: 17775

How can I get rid of this visual artifact in WPF?

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?!

Upvotes: 1

Views: 722

Answers (1)

Mark Carpenter
Mark Carpenter

Reputation: 17775

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

Upvotes: 1

Related Questions