public static bool IsDesignMode(this Control ctl)
{
return System.ComponentModel.DesignerProperties.GetIsInDesignMode(ctl);
}
在控件和窗口的构造函数 或 load 中 this.IsDesignMode() 返回当前是否在设计模式
public static bool IsDesignMode(this Control ctl)
{
return System.ComponentModel.DesignerProperties.GetIsInDesignMode(ctl);
}
在控件和窗口的构造函数 或 load 中 this.IsDesignMode() 返回当前是否在设计模式