WPF 中的音量控制元素
我认为这个问题更适合所有 UI 设计师;-)
我想制作一个看起来像高保真放大器上的音量控制旋钮的 WPFelement。为了更好地表达我正在谈论的内容,请看一下这张图片
我将其从sw VirtualDJ。
该元素应该可以向左和向右转动。当向右转动时,该值应增加 0.5f,向左转动时,该值应减少 0.5f。
为什么我需要这样的东西?目前,我正在为我的 Deneon AVR-4306 放大器开发一个控制开关,我认为使用这样的控件来设置放大器的音量看起来会很酷。
I think this question goes more to all UI designers ;-)
I want to make a WPFelement that looks like a volume control knob on a hifi amplifier. To get a better expresion of what I am talking about take a look at this pic
I cut this out of the sw VirtualDJ.
The element should be turnable to left and right. When it is tured to the right the value should increase by 0.5f and by turning it to the left the value should decrese by 0.5f.
Why do I need such a thing? Currently I am working on a control sw for my Deneon AVR-4306 Amplifier and I was thinking that it would look pretty cool to use such a control to set the volume of the amplifier.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
既然你专门向 UI 设计师提出了这个问题......
无论它看起来是否酷,任何称职的 UI 设计师都会告诉你不要使用这样的控件,因为它实际上不可能使用,至少用鼠标是这样(这在触摸屏上可能没问题) -仅限设备)。鼠标是线性指点设备;尝试用一个“转”一圈是一场噩梦。不要仅仅为了“看起来很酷”而给用户带来这种痛苦。
只需使用滑块即可。它们仍然足够酷,而且非常实用。
Since you addressed this question specifically to UI designers...
Whether it looks cool or not, any UI designer that's worth her salt will tell you not to use such a control because it's virtually impossible to use, at least with a mouse (this might be OK on a touchscreen-only device). Mice are linear pointing devices; it's a nightmare to try and "turn" a circle with one. Don't inflict this pain on your users just for the sake of "looking cool".
Just use a slider. They're still sufficiently cool, and eminently practical.
尝试以下解决方案: 在 WPF 中将图形向鼠标旋转(例如模拟表盘)
您可以使用自己的 ValueConverter 来转换角度和实际值。
Try this solution: Rotate graphic towards mouse in WPF (like an analog dial)
You may use your own ValueConverter to convert beetwen Angle and actual value.