Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make sure validation in adorner layer is shown behind other controls

I have a WPF application that has user validation. This is rendered in the adorner layer, that appears above all other layers, according to documentation.

In the screenshot you can see that this isn't exactly what I want. I have a popup called 'Alert details' which is a ChildWindow from the Extended WPF Toolkit. It is positioned behind the adorner layer. How can I make the popup appear in front of the adorner layer?

I already tried setting a really high Panel.ZIndex on the ChildWindow but that doesn't make a difference.


Screenshot

like image 807
Ronald Wildenberg Avatar asked Apr 20 '12 08:04

Ronald Wildenberg


1 Answers

An AdornerDecorator is used to provide a given AdornerLayer for a set of controls. By default, this decorator is in the default Window template, thus covering all controls in the window.

Add a new AdornerDecorator around your form, and make sure the ChildWindow comes after it so that it's above the decorator.

<Grid>
  <AdornerDecorator>
    ... your summary form ...
  </AdornerDecorator>
  <ChildWindow .. />
</Grid>
like image 93
Julien Lebosquain Avatar answered Nov 05 '22 10:11

Julien Lebosquain