使用Silverlight Toolkit绘制图表(上)--柱状图
2009-02-10 11:57:18 来源:WEB开发网而数据源是在程序中直接写死的,如下:
/**//// <summary>
/// City business object used for charting samples.
/// </summary>
public class City
{
/**//// <summary>
/// Gets or sets the name of the city.
/// </summary>
public int ID { get; set; }
/**//// <summary>
/// Gets or sets the name of the city.
/// </summary>
public string Name { get; set; }
/**//// <summary>
/// Gets or sets the population of the city.
/// </summary>
public int Population { get; set; }
/**//// <summary>
/// Initializes a new instance of the City class.
/// </summary>
public City()
{
}
/**//// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <returns>A string that represents the current object.</returns>
public override string ToString()
{
return Name;
}
/**//// <summary>
/// Gets a collection of cities in the Puget Sound area.
/// </summary>
public static ObjectCollection PugetSound
{
get
{
ObjectCollection pugetSound = new ObjectCollection();
pugetSound.Add(new City { Name = "张庄", Population = 312344, ID = 1 });
pugetSound.Add(new City { Name = "李庄", Population = 411212, ID = 2 });
pugetSound.Add(new City { Name = "赵庄", Population = 261391, ID = 3 });
pugetSound.Add(new City { Name = "马家河子", Population = 530022, ID = 4 });
return pugetSound;
}
}
}
Tags:使用 Silverlight Toolkit
编辑录入:爽爽 [复制链接] [打 印]- ››使用脚本恢复WinXP系统的用户登录密码
- ››使用phpMyadmin创建数据库及独立数据库帐号
- ››使用Zend Framework框架中的Zend_Mail模块发送邮件...
- ››使用cout标准输出如何控制小数点后位数
- ››使用nofollow标签做SEO的技巧
- ››使用 WebSphere Message Broker 的 WebSphere Tra...
- ››使用SQL Server事件探查器做应用程序的性能分析
- ››使用SQL Server事件探查器分析死锁原因
- ››使用纯文本文件打造WCF服务
- ››Silverlight for Windows Phone 7开发系列(1):...
- ››Silverlight for Windows Phone 7开发系列(2):...
- ››Silverlight for Windows Phone 7开发系列(3):...
更多精彩
赞助商链接