自定义设置属性窗口:
public partial class UserControl1 : UserControl { public UserControl1() { InitializeComponent(); } public Image PicImage { get => pictureBox1.Image; set => pictureBox1.Image = value; } public string LabelMsg { get => label1.Text; set => label1.Text = value; } }
样式:
调用加载需要按下Shift+Ctrl+B到工具箱。
这样在主窗体调用就会显示出属性界面: