如何扩展按钮?
我想要一个具有附加属性IsSwitchOffable的Button.
我是否必须编写额外的自定义控件?
编辑: 我希望该按钮可用作标准的WindowsFormsButton.
这包括我可以在设计时添加按钮!
Extending a button control is no different then extending any class in C#. Simply do the following:
class ToggleButton : Button {
// Add your extra code
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5112 次 |
| 最近记录: |