public event EventHandle PrefixChanged;
public string Prefix{
get{return this.prifix;}
set{
this.prefix=value;
if(PrefixChanged!=null)
PrefixChanged(this,EventArgs.Empty);
}
this.Invalidate();// 无效,在控件上显示文字的变化。
}
当你的控件拥有一个公共事件时,它就会像其他事件一样显示在属性浏览器中。