<Window ... AllowsTransparency="True" Foreground="{x:Null}" Background="{x:Null}" FocusVisualStyle="{x:Null}">
注意要设置AllowsTransparency=true,允许透明色,否则就是黑色
WPF的MainWindow设置背景透明仍然显示黑色Black问题
原文:https://www.cnblogs.com/microsoft-zh/p/14801694.html