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.

Proposal: CompositionBackdropBrush sampling over SwapChainPanel

See original GitHub issue

Proposal: CompositionBackdropBrush sampling over SwapChainPanel

Follow up from https://github.com/microsoft/microsoft-ui-xaml/issues/4947

cc. @marb2000

Summary

As described in the related issue, currently CompositionBackdropBrush cannot sample from over a SwapChainPanel. This makes it impossible to apply effects such as GaussianBlurEffect over content being rendered in a SwapChainPanel. This proposal is about allowing content in a SwapChainPanel to be sampled just like other normal WinUI content in a window, so that it can be used as input in any composition pipeline that starts with a CompositionBackdropBrush.

Rationale

  • The SwapChainPanel isn’t always used as a full-window renderer, but it’s often used to compose UI components in an application (eg. a map control, some custom renderer inside a template, etc.). With the current limitation in WinUI 3, this makes it impossible to then apply effects on top of the entire UI (eg. a blur effect if a popup is opened), because those SwapChainPanel-s would then visibly be “glitched” next to the normal WinUI 3 content behind the effect.
  • Make the behavior consistent with UWP (this could be seen as a regression in WinUI 3)
  • Make the behavior more intuitive for developers (“why are these effects not working here?”)

Scope

Capability Priority
Allow CompositionBackdropBrush to sample over SwapChainPanel too Must

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:7
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
kevinguo305commented, Oct 29, 2021

Thanks for submitting this proposal Sergio! It’s in our backlog and we’ll consider this for a future release.

0reactions
Sergio0694commented, Jul 13, 2023
Read more comments on GitHub >

github_iconTop Results From Across the Web

SwapChainPanel Class (Microsoft.UI.Xaml.Controls)
Provides a hosting surface, where Microsoft DirectX swap chains provide content that can be rendered into a XAML UI. A SwapChainPanel element is...
Read more >
How to use SwapChainPanel in XAML Islands - wpf
So, it's not very clear how to create an app which uses a SwapChainPanel control with XAML Islands. Is there a sample somewhere?...
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