C# WPF 中的设计效果(增强应用程序外观的技巧)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1059085/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 07:13:44  来源:igfitidea点击:

Design effects in WPF (tricks to enhance app's appearance)

c#wpfwpf-controls

提问by user101375

I have developed an application that must be presented on exhibition as advertising. I want it to look more sexy! What tricks do you know that enhance the appearance of your applications?

我开发了一个应用程序,必须在展览中作为广告展示。我想让它看起来更性感!您知道哪些可以增强应用程序外观的技巧?

What are the best design effects the developer can use for its application? I am speaking about: glowing, shadows, maybe forms of buttons, beautiful animation of splash screens and so on.

开发人员可以为其应用程序使用的最佳设计效果是什么?我说的是:发光、阴影、按钮的形式、启动画面的漂亮动画等等。

What is YOUR favourite effect?

你最喜欢的效果是什么?

采纳答案by user101375

I found the following examples:

我找到了以下示例:

回答by Justin Niessner

I prefer my effects to be subtle. Some nice, quick, smooth fade in/fade out/glow effects can add a lot of style. If you're going to do bigger animation style effects, splined animations (rather than linear) usually look a little nicer.

我更喜欢我的效果是微妙的。一些漂亮、快速、平滑的淡入/淡出/发光效果可以增加很多风格。如果您要制作更大的动画样式效果,则样条动画(而不是线性)通常会更好看一些。

Don't over-do it though. If you add too much, your application is going to become frustrating to the users that just want to get the task done.

不过不要过度。如果添加太多,您的应用程序将会让只想完成任务的用户感到沮丧。

回答by Patrick Desjardins

The only one I really use for the moment is the Bitmap DropShadowand I do not use it that much just a little shadow. The example below is too much for me. I would reduce the ShadowDepth and the opacity.

目前我真正使用的唯一一个是Bitmap DropShadow,我不怎么使用它,只是一个小阴影。下面的例子对我来说太多了。我会减少 ShadowDepth 和不透明度。

alt text
(source: microsoft.com)

替代文字
(来源:microsoft.com

But the trick is too not use them too much and to use them with consistence. Do not change your effect style over and over all around your application. Otherwise, it will be hard to take it seriously.

但诀窍是不要过多地使用它们并一致地使用它们。不要在您的应用程序周围一遍又一遍地更改您的效果样式。否则,很难认真对待。

回答by Chris Nicol

In terms of enhancing your app, here are some things I personally like:

在增强您的应用程序方面,以下是我个人喜欢的一些内容:

  • Dropshadow ... Creates the effect of depth on your application, ensure a global lighting direction otherwise, it is difficult to maintain a good general effect.
  • Scaling ... When transitioning from one state to another, the use of scaling draws attention to the control/screen
  • Easing ... Whenever there is movement in the screen, the movement should be eased from start to finish.
  • Shine ... For rollovers, I like a subtle shine to a control, this can be achieved by moving a subtle gradient across the control.
  • Dropshadow ... 在您的应用程序上创建深度效果,确保全局照明方向,否则很难保持良好的整体效果。
  • 缩放...当从一种状态转换到另一种状态时,缩放的使用会引起对控件/屏幕的注意
  • 缓动... 每当屏幕有移动时,应从头到尾缓和该动作。
  • 闪耀...对于翻转,我喜欢控件的微妙闪耀,这可以通过在控件上移动微妙的渐变来实现。

These are just a few effects ... I think it's import to note that effects can ruin an app as quickly as it can make one, so you want to make sure that the effects you use compliment your application.

这些只是一些效果......我认为重要的是要注意效果可以尽快毁掉一个应用程序,所以你要确保你使用的效果与你的应用程序相辅相成。

From a UX perspective, my advice is that any interaction from the user should be exaggerated. For example, rollover effects, highlighting click interactions, etc.

从用户体验的角度来看,我的建议是用户的任何交互都应该被夸大。比如翻转效果,高亮点击交互等。

So in conclusion:

所以总结一下:

  • Use effects to highlight user interaction
  • Ensure that effects are used in appropriate places
  • Keep the effects subtle
  • Avoid excessive use of effects
  • 使用效果突出用户交互
  • 确保在适当的地方使用效果
  • 保持微妙的效果
  • 避免过度使用效果

Hope that helps!

希望有帮助!

回答by hejja

If you have no feeling for what looks good, then don'ttry magic trickslike glowing shadows or sparky gradients, it will only look like some awkward app from the late 90s. Like Chris said, effects can ruin an application as quickly as it can make one.

如果你对好看的东西没有感觉,那么就不要尝试发光阴影或闪光渐变之类的魔术,它只会看起来像 90 年代后期的一些笨拙的应用程序。就像 Chris 所说的那样,效果可以尽快毁掉一个应用程序。

There is no silver bullet for good design, the best tip for someone totally lost is: Less is more. Especially when it comes to colors, avoid using many different colors.

好的设计没有灵丹妙药,对于完全迷失的人来说,最好的建议是:少即是多。尤其是在颜色方面,避免使用多种不同的颜色。

Look on other good looking apps (Photoshop CS4, Adobe Reader 9, OSX Preview, etc etc) they are actually really clean.

看看其他好看的应用程序(Photoshop CS4、Adobe Reader 9、OSX Preview 等),它们实际上非常干净。

If you really want to use some wpf-powers an easy trick is opacity transitions, just keep all animations short (max 0.2 seconds). And for moving animations make sure to use acceleration and deceleration, otherwise the animation will look really weird.

如果你真的想使用一些 wpf-powers 一个简单的技巧是不透明度过渡,只需保持所有动画短(最多 0.2 秒)。对于移动动画,请确保使用加速和减速,否则动画看起来会很奇怪。

回答by Mark Schultheiss

Specific effects should be taylored to match the concept of the site. Care should be taken that effects do not get in the way of use, and do not have an overkill such that they have a significant impact on performance.

应根据网站的概念来定制特定的效果。应注意效果不要妨碍使用,也不要过度杀伤,以免对性能产生重大影响。

Try to give your visitors something, rather than hitting them with something.

试着给你的访客一些东西,而不是用一些东西来打击他们。

Tasteful subtle effects can often be more dramatic than glaring bursts of over activity.

雅致的微妙效果通常比过度活动的突然爆发更具戏剧性。

A site for an attorney for instance should be clear and more bland than one for say a games site which can get quite expressive and still be acceptable.

例如,一个律师网站应该比一个游戏网站更清晰、更平淡,它可以变得非常有表现力并且仍然可以接受。

On color:

关于颜色:

The correct mix of color will go a long way to improve appearance with minimal negative impact on use, just use care in different shades of a color group. Try not to have a tan wording on top of a different shade of light brown background for instance, it might degrade the ability to read the text.

正确的颜色混合将大大改善外观,同时将对使用的负面影响降至最低,只需小心使用颜色组的不同深浅度即可。例如,尽量不要在不同色调的浅棕色背景上使用棕褐色的措辞,这可能会降低阅读文本的能力。

I would try to stay away from a mix of colors from opposite sides of the color wheel or a mix of cool and warm colors on the same page.

我会尽量避免色轮两侧的颜色混合或同一页面上的冷暖色混合。

Personally, I would reserve the neon colors for entertainment related things or where the time you expect visitors to stay is limited.

就个人而言,我会保留霓虹色用于娱乐相关的事情或您希望访客停留的时间有限的地方。

Often when you are trying to advertise a product or service, less is more.

通常,当您尝试为产品或服务做广告时,少即是多。