◆自定义控件的初始化问题◆
我自定义了一个控件 ,想在初始时执行一段代码,比如在设计过程中,我把控件的Enabled设置为false了,运行程序是,控件中没有执行MessageBox.Show("1"),这是为什么?
namespace WL_UserControl{ public partial class WL_NavButton : Panel { public WL_NavButton() { InitializeComponent(); if (this.Enabled == false) MessageBox.Show("1"); } ...... }}