I have a List <Foo> from a non-WPF assembly that I am trying to bind to a binding to WPF <ListBox>. Initially, the list items are displayed correctly, but when I add a new item to the <Foo> list, the list does not add the list item. How can I specify in the list box to relink / update / update data and show a new item?
Although using an ObservableCollection is the best way to answer the actual question, the manual update method is to call BindingExpression.UpdateTarget
ObservableCollection, .
. ObservableCollection, BindingExpression.UpdateTarget. , . WPF, , , , . , , . ( !) , .
Source: https://habr.com/ru/post/1706977/More articles:ItemsSource in WPF simplified in C # programmatically - c #Проект XNA - кто отвечает за рисование? - xnaChanging the file name in CFMail - coldfusionHow to check if a tree has perfect match in linear time? - algorithmHow can I edit the selected ComboBox index? - .netКак изменить текст контроллера в URL-адресе ASP.NET MVC? - asp.net-mvcPossible combination of problems with a backpack and? - javaDraw an array of bits (rgb) in windows - c ++Import a certificate in Jetty - javaМожете ли вы безопасно манипулировать DOM с помощью Sharepoint (MOSS 2007) и jQuery? - jqueryAll Articles