window的部分可以在WPF中实现透明亚克力模糊效果吗?

Is it possible to have an transparent acrylic blur effect in WPF on part of the window?

我想要一个可以点击的透明 window,然后能够模糊它的一部分,以便有选择地模糊其他应用程序和桌面后面的内容。最后我想在中间有一个清晰的矩形,然后像这样在外面模糊:

模糊的部分不必让点击通过,但中心仍然应该。

有几个类似的问题,但由于以下原因,它们没有涵盖当前情况:

大多数解决方案似乎不适用于 dotnet core 5 大多数解决方案要么透明地模糊整个 window(即 window 后面的桌面),要么模糊控件重叠的应用程序部分,要么控件本身。 None 其中模糊了后面的桌面内容而不影响整体 window。

是的,我可能可以用 4 个无铬 windows 来制作这个形状,但我希望我不必那样做。

据我所知,答案是:否

我设法使用 https://github.com/riverar/sample-win32-acrylicblur but for one it is kind of ugly as it only enables making a blur background on a window, and no controls of any kind can be shown on that window. So I created 4 windows and tile them around the area in the middle. The issue with that is that the seams between the window are quite obvious which is not ideal.

中的代码实现了类似这样的工作

综上所述,.net core中的wpf除了最原始的方式外,似乎不支持背景模糊。