开发者

Silverlight Toolkit - Multiple ChildWindows and Background

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 wou开发者_如何学编程ldn't be able to see what was open before the ChildWindow was popped up.

Is there any other slick way to achieve this?


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜