Transparency and click through in Avalonia
Asked Answered
L

1

8

I am thinking about porting my app made in WPF to Avalonia.

My first requirement is to enable click-through transparency (same as <Window Background="{x:Null}" WindowStyle="None" AllowsTransparency="True" in WPF).

I've tried this, but it doesn't look like it works (at least on Windows).

ExtendClientAreaToDecorationsHint="True"
ExtendClientAreaChromeHints="NoChrome"
ExtendClientAreaTitleBarHeightHint="-1"
TransparencyBackgroundFallback="Transparent"
Background="{x:Null}"

The target OS's will be Windows, macOS, and Linux. So before installing it in a virtual machine or buying a new device, I need to know if it's possible to have that feature in all OSs.

Lucre answered 16/10, 2021 at 20:48 Comment(0)
E
1

I believe IsHitTestVisible="False" is what you're looking for. When I set this property of a Grid my mouse seems to go through whatever's inside the grid.

I found it here: https://github.com/AvaloniaUI/Avalonia/issues/5664

Elephus answered 18/12, 2023 at 15:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.