Closed CBenni closed 11 years ago
Interesting. Oh, and your Opacity should equal "1.0", not "100". In WPF, Opacity is a float/double instead of an integer.
As far as the invisibility goes, I'll take a look in the code for any possible reasons later today.
Thanks about that Opacity thing, I didnt know that - doesnt make a difference tho.
@CBenni Off the top of my head, could you try adding AllowsTransparency="False"
to your window?
@Amrykid No it does not - I have gone through most of the direct members of Window/MetroWindow and tried them out. Only thing that fixed the issue was changing MetroWindow to Window...
OK, @CBenni I can take a look in the code now. I'll report back with my findings.
EDIT:
Ah ha. Figured it out. It is related to AllowsTransparency
.
I figured something was off when my metro app shows up in OBS.
The issue is related to the implicit BorderlessWindowBehavior
(which has AllowsTransparency
set to true
by default). Simply add this to your window:
<i:Interaction.Behaviors>
<Behaviors:BorderlessWindowBehavior AllowsTransparency="False"/>
</i:Interaction.Behaviors>
After that, it should work fine. Like so:
Awesome! Thank you. Is this still considered a bug? Could this be patched in general or does it hide wanted behaviour? It works fine now however.
It's not a bug. It is off by default in order to have a 'glow' around MetroWindows instead of the Drop Shadow provided by Windows Aero (in Vista, 7 and 8).
I have the same issue, i tried to add
but it still shows black screen behind .
I faced this issue when trying to write a program that is needed to work on livestreams: I create a default MetroWindow and it (including controls on the Window) is just 100% transparent!
I created a MWE: This picture was taken with the default "print screen" feature of Windows.
On the other side, the same situation in Open Broadcaster Software:
The window is completely transparent! Adding the resources to the code didnt change anything about the visibility. I tested around with window capture, my screencap programs (I tested with XSplit, OBS and VHScrCap) find the window but show it as completely transparent.
Is there a quick fix to this? On the long run, this might be an issue that has to be fixed permanently.
The code I was using for this MWE is just
Adding controls or the MahApps resources (as seen in the documentation getting started section) does not resolve any of this.