how to do data binding of dynamically changing data in short time intervals in wpf using mvvm model?

Jawab how to do data binding of dynamically changing data in short time intervals in wpf using mvvm model?

  • 13 April 2012 15:08
     
     

    Hi,

    I am trying to bind data to my xaml file using mvvm light toolkit but the data i am receiving is dynamically changing in short intervals of time.i am not able to update my view when the data changes.please help.Thanks in advance.

Semua Balasan

  • 13 April 2012 15:14
     
     
    Are you saying that data cahnges so quickly that the view doesn't update quick enough?
  • 14 April 2012 15:08
     
     
    No sir.actually the data keeps changing in an infinite loop.i want the view to be updated at every 50 ms.But the problem is that the control passes to the xaml file in the end.So if i use an infinite loop in the model,the program will not reach xaml code.Even if i use a finite loop,the xaml file will show the last updated values.Thanks for taking interest. :)

    kanika

  • 17 April 2012 9:06
    Moderator
     
     Jawab

    Hi kanika khetarpal,

    You could create a background work, and every 50ms to get the data source, then reset your Binding's data source(DataContext property), on the other hand, you could also implentation the INotifyPropertyChanged interface, and then when you change the value, your UI will update automatically, then you could control the UpdateLayout() time.

    http://msdn.microsoft.com/en-us/library/ms743695.aspx

    best regards,


    Sheldon _Xiao[MSFT]
    MSDN Community Support | Feedback to us
    Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • 01 Mei 2012 7:34
    Moderator
     
     

    Hi Hi kanika khetarpal,

    I am marking your issue as "Answered", if you have new findings about your issue, please let me know.

    Best regards,


    Sheldon _Xiao[MSFT]
    MSDN Community Support | Feedback to us
    Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.