即使是透明的,如何使 UWP 控件可点击?

How can make an UWP Control clickable even if it is transparent?

我想让网格可点击,即使它是 100% 透明的。除非我设置不透明 Background,否则不会触发 Tapped。有什么方法可以在 Grid 本身或任何其他控件上实现此目的吗?

不使用 Background 属性和使用 Background="Transparent" 是有区别的。未设置 Background 时无法单击该元素,而将其设置为 Transparent 会使该元素可单击(除非您通过设置 IsHitTestVisible="False" 禁用此功能)。