windows:Principles/design-with-wpf

出自UXGuide.net

跳转到:导航, 搜索

使用 WPF 进行设计
Designing with Windows Presentation Foundation

目录


Windows Presentation Foundation(WPF)是一种用户界面开发环境,提供更高级的视觉控制,如综合了文档、媒体、二维或三维图形、动画、类似 Web 的特性等等的界面。关于一般概述,参见介绍 Windows Presentation Foundation

如果正确使用,Windows Vista® 中的 WPF 能够帮助你创建令你的目标用户喜爱的迷人、高效的体验。如果使用不当,它可能会使你的程序令人厌烦且难以使用。下面的设计规范可以帮助你理解这其中的差别,更恰当地使用这项技术。


遵循 UX 规范

虽然 Windows Vista 用户体验设计规范(或称“UX 规范”)是专为 Windows Vista 而写的,但几乎所有的内容同样适用于使用了 WPF 的程序。当然,这没什么可惊讶的——这些设计规范的主要目的是为“所有”基于 Windows Vista 的应用程序确立一个高质量、统一的准绳,并不在于它们是如何实现的。

虽然 Windows Presentation Foundation 提供了创建各式各样用户体验的灵活性——从传统的 Microsoft® Windows® 到高度自定义的界面——你绝不会感到使用 WPF 会“强迫”你放弃 Windows 的外观和感觉。事实上,WPF 默认提供的即是传统 Windows 的外观和感觉,并包含了 Windows XP 的主题及 Aero 的高级版本。无论你的程序是什么样子,你的基于 WPF 的程序都能获益于像富应用程序模型、动态布局及数据绑定等这些强大的功能。


恰当地使用 Windows Presentation Foundation

WPF 使得完全改变你的程序外观以符合企业的品牌形象成为可能,或是使用自定义的交互模式以让你的程序拥有“独特”的感受。你甚至可以把一个下拉列表自定义得像一个滑块!但哪些对传统体验的改变才真的合适呢?


什么是“酷”?

WPF 提供了一系列激动人心的高级功能,随之而来的便是期望于创造更好的——或者说更“酷”的软件。可往往这些尝试都不在点子上。要理解其原因,让我们先来看看一个程序怎样是酷,怎样不是酷。

这样的程序是真正的“酷”:

这样的程序并不“酷”:

就好像画家的调色板里并没有什么天生好的或差的颜色一样,WPF 也不存在本身好与不好的功能。但是,对于特定的程序及其目标用户来说,我们相信存在恰当的设计和不恰当的设计。真正酷的程序使用了某种技术是因为确实需要,而不是仅因为能够使用。

要达到前面所说的酷,“不要”从这些技术可以做什么开始考虑,而应该专注于你的目标用户真正需要什么。在添加一个“酷”的功能之前,先确保得到明确的用户使用场景(User Scenario)的支持。


目标用户

设计优秀的软件可以简单地看成是进行一系列决策,关于你需要呈现给用户哪些功能以及如何呈现。对于优秀的软件来说,这些决策应当基于该软件及其既定受众的目标而作出。一个好的决策必须基于目标用户的利益——绝不是你自己,或是因为该平台可以很容易做到。

要理解你的目标用户,应当列出他们的知识构成、目标及喜好。你应当理解他们使用你程序的动机、他们多久会使用一次以及他们的工作环境。而且,考虑创建用户的人物角色(Persona)——来自于真实数据的假想人物设计——用于代表一类真实用户。


程序类型

你要创建的程序的类型也是需要考虑的因素。这里列出了一些常见程序类型的特点:


生产型应用程序(Productivity Application)


消费型应用程序(Consumer Application)


游戏


展台


IT 专业人员工具


Improving usability

Some design ideas are good simply because they improve usability. Here are some common ways to improve usability with WPF:


Making decisions

Now, let's put all these factors together. Should you use that transition effect idea you have for your program? Don't start by thinking about the fact that you can do it, or that it's really clever or easy to do. Those factors don't matter to your target users.

Instead, consider the usability of the feature itself. Does the feature benefit from the transition, perhaps because it clarifies an object's source or destination? How quick is the transition? Would overall program performance be harmed?

Consider your target users. Do they perform the task only occasionally and do their time constraints make that transition annoying? And finally, are such transitions appropriate for your program type? Simple transitions that aid in usability are appropriate for nearly all programs, whereas complex animations that don't aid in usability are—at best—suitable for programs intended to entertain users, such as games.

By asking yourself the right questions and giving thoughtful answers, you can use the power of the WPF appropriately to create a great user experience.


The bottom line

At Microsoft, the four tenets of design are that software should be useful, usable, desirable, and feasible. We believe that this is the right list, and that it's in the right order. Appropriately applied, Windows Presentation Foundation helps you better satisfy all four of these tenets.


Guidelines

Theming

As a general rule, application theming is appropriate for programs where the overall experience is more important than productivity. Highly themed applications should be immersive, yet only used for short periods of time. This rule makes theming suitable for games and kiosk applications, but unsuitable for productivity applications.

However, theming isn't an all-or-nothing deal. You can use customized control visuals for specific controls to give them a custom look. For branded consumer applications, you can use simple, subtle application theming to create a sense of brand.

Do:

Don't:


Software branding

In a competitive marketplace, companies brand their products to help differentiate them from the competition. However, having your programs look and act weird doesn't make for a strong brand identity. Rather, your goal should be to create a program with character—a product that stands out while fitting in.

Ultimately, users are most impressed by high quality programs that serve their purpose well. They are unlikely to be impressed by branding that is distracting, or harms usability or performance.

Do:

Don't:

For more guidelines and examples, see Branding.


Custom controls

The Windows common controls are familiar, consistent, flexible, and accessible. They require no learning from experienced Windows users and they are the right choice in almost all situations.

That said, common controls work best for the usage patterns they were designed for. For example, before the slider control became standard, scroll bars were sometimes used instead. But scroll bars are intended for scrolling documents, not choosing from a continuous range of values. Before the standard slider control, it was a good idea to use a custom control for this interaction.

Do:

Don't:


3-D

Do:

Don't:


Animations

There are five basic types of animations:

The human eye is sensitive to motion, especially peripheral motion. If you use animation to draw attention to something, make sure that attention is well deserved and worthy of interrupting the user's train of thought.

Animations don't have to demand attention to be successful. In fact, many successful animations are so natural that users aren't even aware of them.

Do:

Illustration animations

Effect animations

Relationship animations

Transition animations

Feedback animations

Don't:


Dynamic behaviors

With WPF, you can use progressive disclosure to show or hide additional information. Progressive disclosure promotes simplicity by focusing on the essential, yet revealing additional detail as needed.

Progressive disclosure controls are usually displayed without direct labels that describe their behavior, so users must be able to do the following based solely on the control's appearance:

While users can determine the above by trial and error, try to make such experimentation unnecessary.

Do:

Don't:


Direct manipulation

With WPF, you can use direct manipulation to let users interact directly with objects using their mouse, instead of indirectly with the keyboard, dialog boxes, or menus.

Direct manipulation is a natural way to perform many tasks. It is easy to learn, and convenient to use. But there are many challenges, the most important being to prevent accidental manipulation of important data.

Do:

Don't:


Hosting in browser

You have the option of hosting your WPF-based program in a browser.

Do:

Don't:

导航
工具箱