コード例 #1
0
 public Form2(MyModelClass model)
 {
     InitializeComponent();
     this.model = model;
     bindingSource1.DataSource = model;
     DataBindings.Add("BackColor", bindingSource1, "AnotherColor");
 }
コード例 #2
0
        public Form2(MyModelClass model)
        {
            InitializeComponent();
            this.model = model;
            bindingSource1.DataSource = model;
            DataBindings.Add("BackColor", bindingSource1, "AnotherColor");

            model.PropertyChanged += new PropertyChangedEventHandler(model_PropertyChanged);
        }