gpt4 book ai didi

c# - 不透明度未应用于 WPF 弹出控件

转载 作者:太空狗 更新时间:2023-10-29 23:59:31 26 4
gpt4 key购买 nike

Popup popUpControl = new Popup();

popUpControl.PlacementTarget = this;
popUpControl.StaysOpen = true;
popUpControl.Child = new MyUserControl(); /// my user control
popUpControl.Opacity = 0.5; // this code has no effect in the appearance of the popup
popUpControl.IsOpen = true;

怎么做?

最佳答案

您应该启用弹出窗口以具有透明度。添加以下代码行。

popUpControl.AllowsTransparency=true;

关于c# - 不透明度未应用于 WPF 弹出控件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1830570/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com