Logviewer(listbox) not updating synchronously

1 posts, 0 answers
  1. Deepak
    Deepak avatar
    1 posts
    Member since:
    Jan 2012

    Posted 28 Jan 2012 Link to this post


    I have used MVVm pattern in my application having three views.I wanted display log messages(status,error etc) in 1st window( in listbox ).I have created singleton class(loghelper) with function AddLog(),which i am calling whever i wanna update log msg & to write to log file also.so whenver this method gets called ,it triggers event(in loghelper class) and the eventhandler in respective view model gets called and there it adds log messages to Source(ObservableCollection which is bound to list box).
    Now the problem is eventhough log message is added to collection for each log msg ,message is not updating synchronously in list box.View looks like freezing for a minute and all messages updates at a time.
    I am not using multithreading here.
    plz Let me know what causes this problem?

Back to Top