Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: WPF Window
Hi,
 
we got a WPF application based on the MVVM pattern. We show the logging data comming from a piece of hardware in a scrolling window.
The logging data (just strings) are written by the hardware continously into an ObservableCollection in the ViewModel.
This works fine. The capacity of the ObservableCollection is limited, e.g. to 1000 lines.
As soon as the limit is reached we want to remove older lines and fill in new logging data. (We would need a ring-buffer)
We tried to remove the first 30% of the collection an move the rest down to the beginning. But this didn't work with such a Collection.
We also tried to use a Queue<string>, which makes sense. But the WPF window did not update: Binding dosen't work.
Got any idea? Thanks
 
SunnyApril
Posted 8-Aug-12 3:44am
Edited 8-Aug-12 3:47am
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

The problem has already been solved:
http://bea.stollnitz.com/blog/?p=344[^]
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 420
1 _Amy 235
2 Andreas Gieriet 180
3 Peter Leow 175
4 Dave Kreskowiak 155
0 OriginalGriff 7,540
1 Sergey Alexandrovich Kryukov 6,597
2 Maciej Los 3,849
3 Peter Leow 3,653
4 CHill60 2,712


Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 8 Aug 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100