C#混音器,如按钮/组合框 [英] C# Volume mixer like buttons/combo boxes

查看:59
本文介绍了C#混音器,如按钮/组合框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您将如何获得一个按钮,使其外观和性能与Win7上的混音器中的按钮相似?

How would you get a button to look and perform similar to that of the buttons in the volume mixer on Win7?

我的意思是,在音量混合器中,有一些图标,直到您将它们悬停时才看起来不像按钮,悬停时它们也没有标准的蓝色.

What I mean is that in the volume mixer there are icons that doesn't look like buttons until you hover them, they also haven't got the standard blueish color when hovered.

到目前为止,我还没有找到直接在Visual Studio中执行此操作的方法.我猜想创建自定义用户控件是唯一的方法,但是到目前为止我还没有运气,我希望得到一些示例.

So far I haven't found a way to do this directly in visual studio. I'm guessing that creating a custom user control is the only way to go, but I've had no luck so far, I would appreciate some examples.

此外,我想复制的音量混合器中也有组合框.它们会被隐藏,除了文本和箭头,直到它们被悬停为止.

In addition, there are also combo boxes in the volume mixer I would like to duplicate. They're hidden except for the text and arrow until they're hovered.

有没有办法做到这一点?

Is there a way to accomplish this?

(以下图像可能有助于解释我的意思: http://i53.tinypic.com/2ij409u.png )

(Here an image that might help explain what I mean: http://i53.tinypic.com/2ij409u.png)

推荐答案

对于Windows应用程序(以及它们如何实现win7),他们使用了称为

For windows application, (and also how they did win7), they used the technology called WPF. I am not specifically answering how you can do this, because in WPF, this is the fundamental that defining skin (via markup called XAML) without touching the implementation code. If you are serious in learning how to do that, I suggest you look for tutorials or good book about WPF.

这里的标记看起来像一个按钮.要修改按钮的外观,您需要定义它的XAML,而不必在代码中继承它.该示例看起来很长,但是Visual Studio可以帮助您.

Here's one of the markup looks like for a button. To modify the button's look, what you need is to define it's XAML, and you don't have to inherit it in the code. The example looks scary long, but Visual Studio could help you.

这篇关于C#混音器,如按钮/组合框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆