Home > Net >  The MVVM pattern ComboBox data refresh
The MVVM pattern ComboBox data refresh

Time:03-20

WPF MVVM pattern bindings ComboBox data source for List Type data binding is completed using List. Add to add a set of objects how to let the ComboBox real-time refresh

CodePudding user response:

Maybe should use observercollection

CodePudding user response:

Can go to see the INotifyPropertyChanged interface, this interface to modify the data, automatic window control data update

CodePudding user response:

"To solve the WPF binding collection data interface does not change after the update."

CodePudding user response:

After Add the object invocation:
RaisePropertyChange (" you the List of attribute names "),

CodePudding user response:

List Did not provide INotifyCollectionChanged such notification interface, can use ObservableCollection
  •  Tags:  
  • C#
  • Related