INotifyPropertyChanged in WPF

后端 未结 2 1824
梦毁少年i
梦毁少年i 2021-01-19 21:39

Try to understand WPF. This is my test classes:

    public partial class MainWindow : Window, INotifyPropertyChanged
{
    private ObservableCollection

        
2条回答
  •  忘掉有多难
    2021-01-19 22:03

    I think you have two problems:

    1) binding should be: {Binding MyList}

    2) on MyList setter you should use RaisePropertyChanged("MyList");

提交回复
热议问题