Click here to Skip to main content
15,884,298 members
Articles / Programming Languages / C#

Visualizing Live and Historic Stock Data Using Silverlight

Rate me:
Please Sign up or sign in to vote.
4.89/5 (12 votes)
19 Jan 2011CPOL13 min read 80.7K   2.9K   56  
The article aims to present a generic approach of fetching and visualizing live and historical stock data in Silverlight.
using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace StockVisualization
{
    public interface ILiveStockDataQuerier
    {
        /// <summary>
        /// Event fired when the subscribed stock price has changed
        /// </summary>
        event StockDataEventHandler<LiveStockData> OnDataUpdated;

        /// <summary>
        /// Subscribes to the stock, constantly queries it and fires updates when it has changed
        /// </summary>
        /// <param name="stockCode"></param>
        void Subscribe(string stockCode);
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

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


Written By
Software Developer
United Kingdom United Kingdom
I am a WPF, Silverlight and Windows Phone developer. Visit my blog or follow me on Twitter @GergelyOrosz.

Comments and Discussions