Controlling modal window's background / opacity?

Feb 2, 2013 at 6:28 PM
Is it possible to control a modal window's background color or opacity?
I can animate the content's appearance and disappearance, but the containing window appears as solid white as soon as ShowDialog() is called.

I suspect this is a limitation of the Window class...
Coordinator
Feb 6, 2013 at 8:00 PM
It is possible to set a window's background color and/or opacity using P/Invoke, see Silverlight 5 Native Windows P/Invoke for more details.
Feb 6, 2013 at 9:28 PM
ptrelford wrote:
It is possible to set a window's background color and/or opacity using P/Invoke, see Silverlight 5 Native Windows P/Invoke for more details.
Very helpful, thanks.
My app has to run on the Mac, as well; will this technique work on the Mac?
Coordinator
Feb 7, 2013 at 6:07 AM
P/Invoke will only work on Windows in an Out-of-Browser (OOB) application with Elevated Trust. You can however detect the runtime environment before calling.

P.S. There is a known issue in WPF (and Silverlight) related to "the containing window appears as solid white as soon as ShowDialog() is called":
One way to work around this is to load the content of the window before you show it.