wpf 新特性 1

 class Book {
public string Name { get; set; }
public string Author { get; set; }
public decimal Price { get; set; }
public int YearPublished { get; set; }
}
平平淡淡才是真(1020684770)  9:02:02
<Button FontSize="20">
<local:Book Name="Windows Internals"
Author="Mark Russinovich" Price="40"
YearPublished="2009" />
</Button>
wpf 4.5 的新特性
 给book 类重写tostring() 
public override string ToString() {
return string.Format("{0} by {1}\nPublished {2}", Name,
Author, YearPublished);
}

posted on 2012-11-30 09:19  GIS-MAN  阅读(186)  评论(0编辑  收藏  举报

导航