C
C#2y ago
ApathyErr

❔ WPF How do I make transparency only for the gradient background, and not for all elements?

At 0.95 transparency, the text looks fine. When the transparency is 0.35, the text for some reason also becomes transparent
4 Replies
Angius
Angius2y ago
Opacity is inherited from the parent The easiest way would be to have a sibling be translucent Some sort of, say
<Grid>
<Reactangle Opacity="0.5" Background="{}"></Rectangle>
<StackPanel>
<!-- Actual content here -->
</StackPanel>
</Grid>
<Grid>
<Reactangle Opacity="0.5" Background="{}"></Rectangle>
<StackPanel>
<!-- Actual content here -->
</StackPanel>
</Grid>
https://stackoverflow.com/questions/10636502/apply-opacity-for-grid-and-dont-apply-for-its-children-controls https://social.msdn.microsoft.com/Forums/en-US/1a6386b1-0a8e-4f57-99a3-32133e9d55af/is-it-possible-to-set-opacity-only-for-parent-layout-and-not-for-child-elements?forum=xamarinforms
ApathyErr
ApathyErrOP2y ago
Thx ❤️
ApathyErr
ApathyErrOP2y ago
Stack Overflow
Hex transparency in colors
I'm working on implementing a widget transparency option for my app widget although I'm having some trouble getting the hex color values right. Being completely new to hex color transparency I sear...
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server