How to disable a Grid (Panel) in XAML Metro app?

后端 未结 3 1491
攒了一身酷
攒了一身酷 2021-01-28 05:57

I want to emulate modal dialog in XAML Metro App.

So I was going to set .IsEnabled = false on all controls apart from the one which will pose as a modal dialog.

3条回答
  •  生来不讨喜
    2021-01-28 06:50

    Unfortunately no one seems to know (except Mr Skakun who gave wrong answer and never bothered to revise it).

    Hence my solution (the simplest) is to make the element in question Hidden - I cant find any other ways to 'disable' a grid.

    If I wanted to disable it correctly I would have to write a recursive function to find all FrameworkElements in the grid children and set IsEnabled = false though.

提交回复
热议问题