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

    Pergunta

  • 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.

    sexta-feira, 13 de abril de 2012 15:08

Respostas

Todas as Respostas

  • Are you saying that data cahnges so quickly that the view doesn't update quick enough?
    sexta-feira, 13 de abril de 2012 15:14
  • 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

    sábado, 14 de abril de 2012 15:08
  • 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.

    terça-feira, 17 de abril de 2012 09:06
  • 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.

    terça-feira, 1 de maio de 2012 07:34