views:

46

answers:

3

In WinForms I would use the rich text box to show the live output from msbuild. The performance wasn't that great with large amounts of text.

Does WPF have a better performing control? Any techniques to make it perform well?

Thanks in advance!

+2  A: 

I would consider RichTextbox and FlowDocument. But it's also possible to get colored items in a ListBox.

Expected performance: better than in WinForms.

Henk Holterman
Virtualized Listbox is the best option.
Avatar
+1  A: 

I would take a look at FlowDocument and FlowDocumentScrollViewer. Here is a nice FlowDocument overview. Also, take a look at this question for tips on optimizing the performance.

John Myczek
+1  A: 

It depends on what you need.

If it needs to look and act like a textblock, you might need to stay with a document based thing.

But if your log is "record" based, where each log message is a "record", then a ListView might be a better use. You can style individual records in the listview differently using datatemplates, and the ListView supports virtualization, which could help with performance, at least in some ways. This would make it easier to show warnings and errors different than other things, you could use collectionviewsource for sorting and grouping, etc.

John Gardner