Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

CreateHostBackdropBrush fully transparent window #202

Closed
quincycs opened this issue Mar 13, 2017 · 16 comments
Closed

CreateHostBackdropBrush fully transparent window #202

quincycs opened this issue Mar 13, 2017 · 16 comments
Assignees
Labels

Comments

@quincycs
Copy link

Hi

Is it possible to configure CreateHostBackdropBrush so that the brush is fully transparent? Like a hole is cut out for example?

@sohchatt
Copy link
Contributor

sohchatt commented Mar 13, 2017

A HostBackdropBrush paints a SpriteVisual (or UIElement) with blurred pixels from the region of the desktop behind that SpriteVisual. It is a kind of BackdropBrush, with a few differences:

  1. HBB pixels are sourced from behind the application in which they are painted
  2. HBB content is blurred for security reasons
  3. HBB pixels turn transparent when the app is out of focus

So, if I understand your use-case correctly, you can make it appear as if a hole were cut out (by filling an Ellipse with a HBB) but the desktop (backdrop) pixels that fill your ellipse will be blurred.

@quincycs
Copy link
Author

Yeah the use case is fully transparent, no blur. Didn't realize it could be a security issue.

It's for an IoT solution where we'd have another app in the background displaying Ads (these Ads would show thru the transparent piece. And in the foreground the consumer experience would be shown.

@sohchatt
Copy link
Contributor

HostBackdropBrush doesn't seem to apply to your scenario. Why can't you display your ad inside the app (as opposed to behind it)?

@quincycs
Copy link
Author

The Ad program is a proprietary software that is already being used like I suggest with WPF apps. This is a continued missing piece for UWP.

If HostBackDrop gave an option to let it be fully transparent - but that option would be a restricted API for the MSFT general public store then it would be applicable to my scenario.

@quincycs
Copy link
Author

The scenario is a UWP app running on a vending machine. It's not a consumer app that would be downloadable from consumers.

@nerddawg
Copy link
Contributor

Quincy, we have that scenario on our backlog - it is one of the remaining gaps in the UWP SDK relative to what you can do in Win32 with windowing. Although this feature does not deliver that scenario, it gets us going in that direction with the platform and shell work already done. We may possibly support that in future, backed by a restricted capability, and will certainly run specifics by you to ensure it covers what you are looking for.

@quincycs
Copy link
Author

Thank you!

@ratishphilip
Copy link

Is it possible to create a custom shaped window (say an ellipse) and apply HBB to only that area?

@tomzorz
Copy link

tomzorz commented Mar 17, 2017

@nerddawg For me it'd be also important to do this, along with support for click-through. This would allow us to pull of widget-like entities on desktop (or even on mobile if possible, think facebook chat-heads)

@sohchatt
Copy link
Contributor

sohchatt commented Mar 17, 2017

@ratishphilip any more details about what this custom shaped window is supposed to do: do you want elliptic windows or some way of puncturing an elliptic cutout from a window?

If it is the latter: since HBB is a CompositionBackdropBrush, you can paint a XAML Ellipse with it. However, I'm not sure if this answers your question.

@ratishphilip
Copy link

ratishphilip commented Mar 17, 2017

@sohchatt I was referring to elliptical windows.
Since, normally, the window is rectangular, the area not covered by the ellipse shape should be transparent and should not handle mouse/touch interactions. Instead these interaction should be received by the windows behind it (if there are any).

@ratishphilip
Copy link

@sohchatt I want to create something like this
ellipticwindow

@sohchatt
Copy link
Contributor

Unfortunately, HostBackdropBrush isn't of much help to you in this case (i.e. you'd fill your elliptic window with a HBB for the Blur + Tint, but you would still need an elliptic window to achieve this). Marking this as a feature request for non-rectangular window boundaries.

@brucek5
Copy link

brucek5 commented Apr 14, 2017

I too want to make the transition from WPF where I create "touch" based applications for Windows 10. Attached is a screen capture of some of the windows ( a cloud and a notepad) that uses the transparent window option that WPF provides. Will UWP get me there, or is this a step backwards?
window_example

@tomzorz
Copy link

tomzorz commented Apr 14, 2017

@brucek5 you can't do this at the moment with UWP :(

@daneuber
Copy link
Member

daneuber commented Aug 7, 2017

Thanks all for the feedback! It looks like a few feature requests have been created out of this issue chain, so closing this issue. Please open another issue if there's additional feedback.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

7 participants