wpf - why Dispatcher.invoke() not working? -


whenever change occured changes call set_filelist_inventory(). , send new list function ui not upadating.

public partial class inventory : usercontrol {     public list<string> file_list = new list<string>();     public void set_filelist_inventory(list<string> x)      {         if (file_list.sequenceequal(x)) { }         else         {             file_list = x;             dispatcher.invoke(() =>             {                 listview1.itemssource = file_list;             });         }     }      public inventory()     {         initializecomponent();         file_list = general.getfilelist();         discover d = new discover();         d.send(d);         listview1.itemssource = file_list;      }  } 

i tried removing if else block. still didn't worked.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -