Possible Duplicate:
Elegant Log Window in WinForms C#
I need a log-viewer to check the DB for new logs every few seconds and append them to a WinForms or WPF control. The control can have a buffer like command prompt and keep only the last [buffer size] lines.
What can I use for this?
If you are going to use WPF, then ListBox control can work as display control. You can define various templates using ItemTemplate property of ListBox(based on log type)
This ListBox can be bound to Observable collection of ViewModel/DataContext.
You can then define your business logic in viewmodel to add/ remove entries from ObservableCollection. Changes in ObservableCollection will get reflected in Xaml UI due to binding.
[Note – You can use any other itemscontrol, there is no compulsion of using ListBox]