加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

.net – 我应该在Windows消息框中使用警告图标或问号图标吗?

发布时间:2020-12-13 20:13:05 所属栏目:Windows 来源:网络整理
导读:许多人知道MessageBoxIcon类型为“问题”.如果你不太熟悉这个图标,那只是一个荣耀的问号.关于这个图标在专业应用中是否可以接受,我很好奇.例如,假设我有一个按钮,当单击时,将清除整个表单上的所有文本字段.当点击按钮时,我想向用户警告他的行动将要做什么.我
许多人知道MessageBoxIcon类型为“问题”.如果你不太熟悉这个图标,那只是一个荣耀的问号.关于这个图标在专业应用中是否可以接受,我很好奇.例如,假设我有一个按钮,当单击时,将清除整个表单上的所有文本字段.当点击按钮时,我想向用户警告他的行动将要做什么.我可以写下列任一项:
MessageBox.Show("Really clear all data?","Clear confirmation",MessageBoxButtons.YesNo,MessageBoxIcon.Question);

要么

MessageBox.Show("Really clear all data?",MessageBoxIcon.Warning);

你们都会说这两个是更专业?

我不认为这是“专业精神”的问题,但这绝对违反了微软的指导方针.

对于MB_ICONQUESTION标志的documentation有这个说法(和MessageBoxIcon enum的“Question”成员一样):

A question-mark icon appears in the message box. The question-mark message icon is no longer recommended because it does not clearly represent a specific type of message and because the phrasing of a message as a question could apply to any message type. In addition,users can confuse the message symbol question mark with Help information. Therefore,do not use this question mark message symbol in your message boxes. The system continues to support its inclusion only for backward compatibility.

而Windows用户体验互动指南的Standard Icons部分非常明确地表示,问号图标只能用于指示“帮助入口点”:

Question mark icons

  • Use the question mark icon only for Help entry points. For more information,see the Help entry point guidelines.
  • Don’t use the question mark icon to ask questions. Again,use the question mark icon only for Help entry points. There is no need to ask questions using the question mark icon anyway—it’s sufficient to present a main instruction as a question.
  • Don’t routinely replace question mark icons with warning icons. Replace a question mark icon with a warning icon only if the question has significant consequences. Otherwise,use no icon.

我强烈建议您阅读整个文件;它提供了许多有用的提示,选择正确的图标.但在这种特殊情况下,由于您要求用户确认涉及潜在数据丢失的操作,因此您应该使用符合本指南的警告图标:

  • For question dialogs,use warning icons only for questions with significant consequences.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读