I have a UWP App and I use SwapChainPanel to insert MonoGame.
in Render():
_game.GraphicsDevice.Clear(Color.Transparent);
But it didn’t work.
<Grid Background="White">
<SwapChainPanel x:Name="swapChainPanel">
</SwapChainPanel>
</Grid>
Could you help me to figure out it?
Hi @Aloento , Welcome to the Community!
I like your project!
Perhaps, you should do the background inside MG instead?
What are you hoping to achieve?
Happy Coding!
EDIT
I found this:
swapChainPanel.Background.Opacity = 0.3;
But unsure how to use an instance of it, been a while since I did any coding only just getting back into the swing of things…
EDIT
Unfortunately this is completely not possible…
EDIT
Well… half way there…
<SwapChainPanel x:Name="swapChainPanel" Opacity="0.3"/>
1 Like
Aloento
January 19, 2021, 12:05pm
3
But if you use Opacity, which means all of them will be transparent. For my part, I tried, if Opacity is 0.0 that nothing will show out.
SuperSpineViewer-Sharp-/MonoPlay.cs at master · soarteam/SuperSpineViewer-Sharp- (github.com)
There is my _game type. If you are interested, you can check it.
I just want to know why you need the transparency when you can just colour the background any colour you want?
Aloento
January 19, 2021, 12:08pm
5
No, I need to take a screenshot for this Spine animate and save it to a PNG file.
I want to provide a function that export Spine animate to sequence.
You do realise, you can just colour the background Magenta, as that would be required anyway?
Aloento
January 19, 2021, 12:12pm
7
For this function, it cannot include any background. It must be transparent. Otherwise, the export file will not be available to use for creating videos.
Just consider it a shortcut for the time being so you can resume development…
Also, videos can perform chromakeying
Aloento
January 19, 2021, 12:14pm
9
I know how to do this in XNA4 with WPF. And I have already done it in Java.
I will try it out and resume development.
1 Like
Aloento
January 19, 2021, 12:15pm
10
This is Java type. I’m a freshman at C# with UWP and Monogame so I will learn more.