1.在用户控件代码页面中添加Load加载方法(事件),如下图所示:

用户控件UserControl添加Load加载事件

 代码:

//用户控件自定义加载事件
private
void ColorGrupMapManagerUC_Load(object sender, EventArgs e) { LoadCatalogMainItems(); this.toolStrip1.Enabled = ColorThemeId > 0; }

 

 2.在设计器中InitializeComponent()中添加如下一行代码,完成向UserControl添加Load加载事件。

用户控件UserControl添加Load加载事件

代码:

this.Load += new System.EventHandler(this.ColorGrupMapManagerUC_Load);

 

 

注:原理后续需完善。

相关文章:

  • 2021-12-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-20
  • 2022-12-23
  • 2021-11-10
  • 2021-11-14
猜你喜欢
  • 2022-12-23
  • 2021-07-03
  • 2022-02-25
  • 2022-01-16
  • 2021-09-29
  • 2022-12-23
  • 2021-09-27
相关资源
相似解决方案