Vishal
Vishal

Reputation: 11

Implementing UI for a stock charting application on Windows - what technology to use WPF or WinForms?

I want to implement UI for stock charting application. (I already have an engine working which will provide the data for the UI - the engine is in C#).

The app will update charts in real time as stock price change (candlestick charts, bar charts, line charts etc..).

I wanted to know what technology will suit best for my requirement: WinForms or WPF?

Upvotes: 1

Views: 1178

Answers (3)

Gergely Orosz
Gergely Orosz

Reputation: 6485

If you're doing greenfield application development I would probably suggest WPF to WinForms.

Pros:

  • Less code and better separation: with WPF supporting bindings instead of having to write the app following the MVC pattern with the Controller layer being thick, you can create it following the MVVM pattern, having a relatively lightweight ViewModel
  • Easy to reuse almost all of the code you write and port to Silverlight or Windows Phone 7 later down the way. Porting Windows Forms code to the web or mobile is much more painful
  • More charting libraries actively developed for WPF: there are a handful of vendors providing and constantly updating their charting libraries for WPF. Vendors include Visiblox Charts (see an example trading application in Silverlight - should be the same in WPF due to ease of porting of code), Telerik RadChart and Infragristics xamChart

Cons:

Upvotes: 4

Mark
Mark

Reputation: 14930

The WPF toolkit (http://wpf.codeplex.com/) has charting already built into it, you just need to plug-in the data (which you already have). It has full support for all sorts of graphs, not to mention animations and custom styling.

Upvotes: 0

ehnmark
ehnmark

Reputation: 2736

Without knowing more about your requirements, I'd say you'll be fine with either. However, it may be worth knowing that thirdparty control vendors appear to focus more on their xaml controls than their older Winforms ones nowadays.

For example, you might want to use Infragistics's XamDataChart which is quite a bit fancier and has more finance charting features than their older WinChart (I'm sure the same is true for Xceed's and Telerik's equivalents and am not pushing Infragistics in particular.)

Upvotes: 0

Related Questions