Silverlight 工具包 - 多个 ChildWindows 和背景

发布于 2024-11-04 09:29:54 字数 513 浏览 1 评论 0原文

当我从 SL Toolkit 打开 ChildWindow 时,周围区域变成漂亮的灰色。但是,如果我的 ChildWindow 本身生成了一个新的 ChildWindow,则周围区域会变成深灰色,无限,直到我的外部区域变成乌黑。

有没有办法让每个新的 ChildWindow 弹出,周围区域与第一个子窗口相同的浅灰色?我不想完全关闭此效果,因为我仍然希望之前的 Childwindow 变灰;我只是不想让它被黑。

在查看这个问题时,我得到了印象是我想要的东西是不可能的。提供灰色背景的覆盖网格的不透明度介于 0 和 1 之间,这就是每个新覆盖层都会添加到前一个覆盖层的原因。不透明度为 1 可以防止这种变黑,但您将无法看到在弹出 ChildWindow 之前打开的内容。

还有其他巧妙的方法来实现这一目标吗?

When I open a ChildWindow from the SL Toolkit, the surrounding area turns a nice gray. But, if my ChildWindow itself spawns a new ChildWindow, then the surrounding area turns a darker gray, ad infinitum until my outside area is jet black.

Is there a way to have each new ChildWindow pop up with the surrounding area the same light gray as the first one? I don't want to turn off this effect altogether since I still want the previous Childwindow to be grayed out; I just don't want it to be blackened.

In looking at this question I get the impression that what I want is impossible. The overlay grid that supplies the gray background has an opacity between 0 and 1, which is why each new overlay adds to the previous. An Opacity of 1 would prevent this blackening, but you wouldn't be able to see what was open before the ChildWindow was popped up.

Is there any other slick way to achieve this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

哎呦我呸! 2024-11-11 09:29:54

假设您有 child1 和 child2,并且 child1 打开 child2。当child1打开child2时,您可以将child1覆盖层的不透明度设置为0。然后,当child2关闭时,将child1覆盖层的不透明度设置为默认值。

Let's say you have child1 and child2 and child1 opens child2. When child1 opens child2, you could set the opacity of child1's overlay to 0. Then, when child2 closes, you set the opacity of child1's overlay to the default value.

绮烟 2024-11-11 09:29:54

子窗口有两个属性,您可以调整它们以获得所需的叠加层:OverlayBrushOverlayOpacity

The child window has two properties that you can tweak to get your desirable overlay which are: OverlayBrush and OverlayOpacity.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文