發表文章

目前顯示的是 12月, 2023的文章

自製控制項集合輸入

圖片
主要目的:在屬性設定畫面可以設定自製控制項集合 操作畫面:   執行畫面: 程式碼: 需要兩個 UserControl1、UserControl2 ,UserControl1 包含 UserControl2     public partial class UserControl1 : UserControl     {         private List<UserControl2> MyUC_Temp = null;         //將自製控制項,設定在設計時就能從面板設定集合的方法         //不用 set !!         [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]         [Localizable(true)]         [MergableProperty(false)]         public List<UserControl2> MyUC         {             get {                 RefreshButton();                 return MyUC_Temp;             }         }         public UserControl1()      ...