views:

18

answers:

2

Hi everyone! I need to Lock all controls of my window except one, if I write

Me.MainGrid.IsEnabled = False

I obtaind the result but many controls change the appearance. I need they maintain the current appearance, like when I open a WinDialog with ShowDialog. To redefine the style af all controls is a too much "chinese" work. There is another way? Thank you! Pileggi

+1  A: 

You could add a new child (grid, for example) to MainGrid with a transparent background and max column/row span. Also make sure it's Panel.ZIndex is higher than any other child in MainGrid.

Bubblewrap
A: 

If you use ShowDialog your MainWindow is locked, so no need to set IsEndabled.

lukas
No, ok, maybe it wasn't plain. I meant that I need to lock my controls, as they are when there is a child-window opened with ShowDialog. They don't change their appearance. But in my case there is no WinDialog.
pileggi