publicclassMyButton:Button{publicstringMyText{get{return"按钮上显示的是:"+this.Text}}}最简单的控件,跟普通按钮完全一样,就是多了个只读的属性叫MyText~~~