即使运行模态对话框,如何才能访问 WinForm 应用程序的某些功能?
我有一个“主窗口”,其中包含很多内容,包括状态栏中(窗口最底部)的“支持”按钮,用户可以随时使用该按钮打开一个包含以下内容的窗口:我们的支持电话号码,以及一些聊天功能(如果用户愿意与我们聊天)。
问题是,如果程序显示模式对话框,则“支持”按钮不再可单击。
停止使用模式对话框不是一个选择; 我使用它们是因为有时我想强制用户执行特定任务,然后我才能在软件中执行其他操作。
让用户无需关闭当前模式对话框即可联系支持人员的最佳方式是什么?
I've got a "Main Window" containing quite a few things, including, in the status bar (at the very bottom of the window), a "Support" button, which the user can use at any time to open a window containing our support phone number, along with a little chat functionality if the user prefers to chat with us.
The problem is that if the program is displaying a modal dialog, the "support" button is not clickable anymore.
Stopping using modal dialogs is not an option ; I use them because I sometimes want to force the user into performing a specific task before I can do something else in the software.
What's the best way to let the user contact the support without having to close the current modal dialog?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
模态对话框的行为应与模态对话框相同,即使可能,用户也不会期望能够单击主窗口中的按钮。
最好的选择是在对话框上也放置一个支持按钮。
Modal dialogs should behave as modal dialogs, the user won't expect to be able to click a button in the main window even if it were possible.
Your best bet is to put a support button on the dialog too.
使用快捷键代替按钮可能是一种选择。 该功能可以分解为一个基本表单类,如下所示:
Using a shortcut key instead of a button may be an option. The functionality could be factorized into a base form class like this :
不使用模式对话框是一种选择。 您可以在所需的交互过程中禁用界面的其他部分,以从用户那里获取您需要的任何内容。
解决方案是避免用户“必须”做某事的情况。 例如,如果用户想立即退出应用程序,或者在后台窗口中查看某些内容,或者引用应用程序的其他部分,则模式对话框通常会成为障碍。 不要使用它们,而是设计您的交互,以便如果存在所需的操作/信息,则将其折叠到应用程序逻辑中。
想想网站设计——模式对话框在网络上很少见,并且有充分的理由——它们不必要地扰乱了用户的工作流程。 然而,许多网站都有“必需”的信息。
不要使用模式对话框; 它们是避免更好设计的捷径。
Not using modal dialogs is an option. You can disable other parts of your interface during the required interaction to get whatever it is that you need out of the user.
The solution is to avoid situations where the user 'must' do something. Modal dialogs often get in the way if, for example, the user wants to quit the application right at that moment, or see something in a backgrounded window, or refer to another part of your application. Instead of using them, design your interaction so that if there is a required action/piece of information, it's folded into the application logic.
Think about website design -- modal dialogs are very rarely found on the web, and for good reason -- they disrupt the user's workflow unnecessarily. And yet plenty of sites have 'required' information.
Don't use modal dialogs; they are a shortcut to avoid a better design.