castorix / WinUI3_SwapChainPanel_Layered

43 stars 2 forks source link

How to passthrough the mouse event at transparent area #2

Open maggch97 opened 1 year ago

maggch97 commented 1 year ago

This demo is very helpful. But does anyone know how to passthrough the mouse event at transparent area? I want the mouse can click the window under the transparent area.

I found some document said in WPF, SetLayeredWindowAttributes with green crKey can make the transparent area unclickable, but I don't know how to do that in this demo.

castorix commented 1 year ago

I posted some methods I tested in the thread : https://github.com/microsoft/microsoft-ui-xaml/issues/1247#issuecomment-1386868376 They work, but not very good methods...