Click here to Skip to main content
15,881,882 members
Articles / Desktop Programming / WPF

How to create stock charts using the Silverlight Toolkit

Rate me:
Please Sign up or sign in to vote.
4.70/5 (15 votes)
16 Feb 2009CPOL2 min read 141.9K   2.7K   65  
An article on how to create a Candlestick stock chart using the Silverlight Toolkit.
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.

using System;
using Microsoft.Windows.Controls.Samples;
using System.Collections.ObjectModel;
using System.Windows.Controls;

namespace Microsoft.Windows.Controls.Samples
{
    /// <summary>
    ///  Business Object used in the ThemeBrowserSample.
    /// </summary>
    public sealed partial class MediaItem
    {
        /// <summary>
        /// Gets the name of the Media.
        /// </summary>
        public string MediaName { get; private set; }

        /// <summary>
        /// Gets an Image representing the media.
        /// </summary>
        public Image Image { get; private set; }

        /// <summary>
        /// Gets or sets Description of the media.
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// Gets or sets Date Stump of the media.
        /// </summary>
        public DateTime Date { get; set; }

        /// <summary>
        /// Initializes a new instance of the Catalog class.
        /// </summary>
        /// <param name="resourceName">Name of the resource defining the Image of the media.</param>
        /// <param name="mediaName">Name of the media.</param>
        /// <param name="description">Description of the media.</param>
        /// <param name="date">Date Stump for the media.</param>
        public MediaItem(string resourceName, string mediaName, string description, DateTime date)
        {
            MediaName = mediaName;
            Description = description;
            Image = SharedResources.GetImage(resourceName);
            Date = date;
        }

        /// <summary>
        /// Overrides the string to return the name.
        /// </summary>
        /// <returns>Returns the photograph name.</returns>
        public override string ToString()
        {
            return MediaName;
        }       
    }
}

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
South Africa South Africa
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions