是否有类似于C#的C# [英] Is There Something Similar to CButton for C#

查看:152
本文介绍了是否有类似于C#的C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CButton是否有类似的类似类/库:使用UITypeEditors(VB.NET)进行丰富的设计时编辑 [^ ]

谢谢


谢谢您的回答,所以我决定在C#WPF中执行此操作,但一个问题是,我如何在VB中使用,如在其中使用DimColorHoover =数字.要使鼠标处于打开状态,按钮的颜色只是明亮而不是其默认的表单颜色.
[/Edit]

Is there any simmilar class/library for CButton like this: Rich Design Time Editing with UITypeEditors (VB.NET)[^]

Thanks


Thanks for your answers so i decided to do it in C# WPF, but one question how i can use like in VB where u use DimColorHoover = number in there. To when mouse is on button color is just bright not to its default form color.
[/Edit]

推荐答案

System.Windows.Forms.Button(对于System.Windows.Forms),System.Windows.Controls.Button(对于WPF).您可以应该子类化这些类(或更确切地说,它们的基类).另一种方法(通常是更好的方法)是Control的子类(两个库都具有此类,Button是间接从其派生的).



有关鼠标悬停行为的后续问题将作为一个单独的答案回答.

—SA
System.Windows.Forms.Button (for System.Windows.Forms), System.Windows.Controls.Button (for WPF). You should can subclass those classes (or rather their base classes). Alternatively (usually better way) you subclass Control (both libraries have such class, Button is derived from it indirectly).



The follow-up Question on mouse hovering behavior is answered as a separate Answer.

—SA


我没有浏览链接,但是如果VB.Net中存在该链接,则可以在C#项目中添加对该dll的引用并立即使用它.
I have not gone through the link but if that is there in VB.Net, then you can add a reference to that dll in your C# project and use it right away.


回答后续问题:如何处理鼠标悬停在控件上的方法,可以覆盖System.Windows.Controls.Control.OnMouseEnter/OnMouseLeave或处理事件System.Windows.Controls.Control.MouseEnter/.

现在我对OP提出了一个问题:您打算在多长时间内针对您可能需要的每个功能提出这样的问题?毕竟,请查看类System.Windows.Controls.Control上的帮助,如果仍然有问题,请提出一些实际问题.以防万一,看看System.Windows.FrameworkElement及其相关内容.

参见
http://msdn.microsoft.com/en-us/library/system. windows.controls.control.aspx [ ^ ]
http://msdn.microsoft.com/en-us/library/system.windows. frameworkelement.aspx [ ^ ]…

我需要解释如何做吗?我可以始终始终将适当的参考放在方便的地方……

—SA
Answering the follow-up Question: how to handle mouse hovering over the control either override System.Windows.Controls.Control.OnMouseEnter/OnMouseLeave or handle events System.Windows.Controls.Control.MouseEnter/MouseLeave.

Now I have a question to OP: how long do you plan to ask questions like that, on every feature you may possibly need? After all, look at the help on the class System.Windows.Controls.Control and ask some real questions if you still have problems. Just in case, take a look at System.Windows.FrameworkElement and related stuff.

See
http://msdn.microsoft.com/en-us/library/system.windows.controls.control.aspx[^]
http://msdn.microsoft.com/en-us/library/system.windows.frameworkelement.aspx[^]…

Do I have to explain how to do it? I can, always keep appropriate reference handy…

—SA


这篇关于是否有类似于C#的C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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