开发者

How to display a layer over all Controls [closed]

开发者 https://www.devze.com 2022-12-14 14:14 出处:网络
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing
Closed. This question is opinion-based. It is not currently accepting answers.

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 7 years ago.

Improve this question

I've got a Window which opens a borderless Dialog where you select some options. Once the options are set the Dialog closes and the main Window is enabled again. Not too difficult.

But due to the changed options in the option screen I need to refr开发者_运维知识库esh the main window and prevent changes from beeing made before the refresh.

So now I'd like to add and extra layer with a ProgressBar in the middle to notify the user: please wait, we are refreshing.

What would be the best practices around this?


You could take a look at Adorners (MSDN link) which allows you to stick a rendering surface on top of other UI Elements. That would allow your existing controls to be ignorant of the refreshing stage and allow incapsulation of the progress-visualization inside the Adorner and the chunk of code that is required to show/hide the Adorner layer


I just learned about the Popup primitive control. It isn't modal, but it does overlay other controls on the screen.

You could, hypothetically, open a popup that covers the entire window (you'll have to move it if the user moves the window) that has a transparent background with an opaque centered panel that displays your wait message. Add a tinted transparent background to the popup for a dimmed UI experience.

0

精彩评论

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