3
votes

I'm sure it has been asked before (but couldn't find any resources that solves my problem), I'm creating a Silverlight application where users may install and use in OOB mode, using elevated trust. I want my "windowless window"s background to be transparent so I've set the app to run windowless in OOB mode, and put some margin around my Grid (main grid) along with a drop shadow effect. What I'm trying to achieve is the "zune window" effect: a rectangular main borderless window with drop shadow. I was able to do it in WPF but in Silverlight, I'm getting a white background:

enter image description here

I don't want this white background, and I've double checked that NOTHING has a white background set, but I'm still getting this. How can I get rid of that white border (obviously while keeping the drop shadow effect)?

1
SL5 + P/Invoke + DWM = awesome - Denis
even if SL5 (final) was here now, wouldn't using P/Invoke lock my app to Windows only, killing the whole idea of desgning the app in SL instead of WPF.. - Can Poyrazoğlu
not exactly, your application running on vista and win 7 would get upgraded visuals while on XP and Mac it would use standard chrome. Much better than windows or bust you get with WPF. But if WPF is that you want then just go with it, WPF on windows and SL on Mac could be another way of doing it. - Denis
if i could use P/Invoke selectively then it's ok, i thought it was platform-specific. I'll be waiting for SL5 then and until then I'll be using standard window i guess.. - Can Poyrazoğlu
@Denis Do you have more leads to a P/Invoke solution? I know Silverlight inside out, but I'm weak on Win32. - John

1 Answers

1
votes

The short answer is: you can't.

The long answer is: The Window object represents a client window with a solid color background and there is no way to change that color.