question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RadialGradientBrush should expose AlphaMode setting (WCT compat)

See original GitHub issue

Describe the bug One thing we did when we added the RadialGradientBrush to the Windows Community Toolkit is add an AlphaMode property from the underlying Win2D systems. This allowed for finer control of the brush settings, especially for transparency. We left the defaults for WPF compatibility of course.

Screenshots From Toolkit sample app:

Default behavior: image

Premultiplied: image

Version Info

NuGet package version: v2.4.0-prerelease.200422001

Windows 10 version Saw the problem?
Insider Build (xxxxx)
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop
Mobile
Xbox
Surface Hub
IoT

Additional context

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
chingucodingcommented, May 29, 2020

Left this comment on the PR to depricate it in WCT, leaving this here too for clarity:

The WinUI brush uses the CompositionRadialGradientBrush which does not expose this property (or anything comparable). Maybe somebody else knows more about this, but I don’t think that the current implementation would be able to provide an AlphaMode property.

1reaction
michael-hawkercommented, May 7, 2020

@chingucoding exactly, usually most of the heavy lifting on these items is done in the initial feature work. For instance, I imagine adding this last property should be pretty straight-forward for RadialGradientBrushes case (famous last words). 😋

Read more comments on GitHub >

github_iconTop Results From Across the Web

RadialGradientBrush.AlphaMode Property
Gets or sets a AlphaMode enumeration that specifies the way in which an alpha channel affects color ... The default is Straight for...
Read more >
API Document | PDF | Microsoft Windows
API Document - Free ebook download as PDF File (.pdf), Text File (.txt) or read book online for free. api.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found