-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to place any controls on top of WPF Acrylic blur #80
Comments
The issue is that WPF composes all of its content into one surface. From the perspective of the system compositor, there is only one bitmap that we see. As such, we can only compose dcomp/WUC content above or bellow that bitmap. This is sometimes referred to as the "airspace problem". If you could separate the content that is supposed to be "above" and "bellow" the visual, you could make this work. Unfortunately, I don't know off the top of my head how to achieve this in WPF. |
I have almost spend two weeks on this issue but no luck, i was able to fix
the flickering issue of the acrylic content on resize, but this is beyond
my knowledge.
Will it be possible to get the final bitmap or the backdrop brush as bitmap
, then it is possible to solve this issue. Is there any way that we could
make use of D3D10Image class to get the bitmap.
…On Fri, 22 Jan, 2021, 4:17 am Robert Mikhayelyan, ***@***.***> wrote:
The issue is that WPF composes all of its content into one surface. From
the perspective of the system compositor, there is only one bitmap that we
see. As such, we can only compose dcomp/WUC content above or bellow that
bitmap. This is sometimes referred to as the "airspace problem".
If you could separate the content that is supposed to be "above" and
"bellow" the visual, you could make this work. Unfortunately, I don't know
off the top of my head how to achieve this in WPF.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARKGWVMWHHKKQDQUY6M4673S3CVJ5ANCNFSM4WL76TSQ>
.
|
So there is no way to do this. In .NET 4.5 they have introduced two properties to fix this aerospace problem, but it has been removed on the next releases.
|
Unfortunately it looks like the only way to get this to work is to fake it. If you knew what content was to be underneath, you could manually apply the effects yourself using Win2D or D2D. However, that solution is imperfect and imposes constraints on what can be placed underneath the effect area without breaking the illusion. |
But there is no way to get the host backdrop brush without a Compositor. I
have tried all the way I could and also tried some alternatives like using
desktop background as backdrop but when it comes to aero snap that one
breaks.
Here is the demo (when using desktop background) :
https://youtu.be/V-G8s-ol6p4
Here is the demo using this acrylic blur : https://youtu.be/_SV-s4Q4O1s
Both have a very good diffrence. But when rendering to wpf window both of
them will overlays the contents because they both use direct composition.
The desktop background acrylic uses IDComposition.
…On Fri, 22 Jan, 2021, 8:57 am Robert Mikhayelyan, ***@***.***> wrote:
Closed #80
<#80>
.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARKGWVNW66XOMR3L7GGMKVTS3DWBZANCNFSM4WL76TSQ>
.
|
I was trying to place one button over the acrylic control but the button appears to be under the control like this:
I have tried changing
_compositorDesktopInterop.CreateDesktopWindowTarget(HwndHost, true, out _compositionTarget);
second argument to false (topmost), but it doesn't work. is this because Direct composition can draw only on top of all other controls.
The text was updated successfully, but these errors were encountered: