C# – Wpf: Back window gets darken


I am seeking a behavior similar to those feedback buttons on webpages. When you click, a control appears in the center of the screen and the parent webpage gets darkened (and disabled).

In my case – A UserControl appears in the center of main window if I click on a button. Both the new UserControl and clicked button reside in same window but different grids.

How can I make the Grid A darkened when New Control's visibility is changed? Is there a better way to achieve.

Thanks in advance.

Best Solution

In the main grid, the one you wish to darken, change the opacity property to be less that 1.

This also requires you having the background of the window (or the control under it) be set to Black.

Related Question