Looking for guidelines How to refresh UI handling high volume trade data using WPF and C# ? Please mention various tools and approach not going far way from Microsoft technology stack ? Can somebody share code ?
-
2You need to be a lot more specific, and preferably ask questions about a particular approach or piece of code you've already thought up. Right now you're basically asking for everything there is to know about graphics performance in WPF, which would take multiple books to answer. – Ben Voigt Jan 20 '14 at 01:40
-
I have a WCF service which will pump in millions of trade updates. I need to have a mechanism where this updates be pushed to my UI. My UI should be responsive(non-freezing) while getting those updates as well as while doing any UI related activities such as mouse click, text box change etc. – rajibdotnet Jan 20 '14 at 04:00
2 Answers
I'd suggest you take a look at Reactive Extensions:
The Reactive Extensions (Rx) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators.
You can use it to push your trade data in a controlled fashion to your UI, so that updates are performed at a given time interval or whenever a certain number of updates have been received (i.e. batching), for instance.
Introduction to Rx is a great and brief free book on the subject. You may find other useful links in this SO question.
You should probably use INotifyProperty changes interface on your classes and ObservableCollections for collections. This way when you bind your UI with data every change on data will be auto-reflected on UI
Here are few examples : http://www.codeproject.com/Articles/15822/Bind-Better-with-INotifyPropertyChanged http://msdn.microsoft.com/en-us/library/ms748365(v=vs.110).aspx

- 7,659
- 6
- 35
- 39