摘要: using System;using System.ComponentModel;using System.Globalization;using System.Windows.Data;namespace WPFComponents{ [ValueConversion(typeof(string), typeof(int))] public class StringToIntegerConverter : IValueConverter { public object Convert(object value, Type targetType, ... 阅读全文
posted @ 2013-09-19 14:57 若愚Shawn 阅读(550) 评论(0) 推荐(0) 编辑
摘要: 如何拿到Source:从SQL,从XML fileSQL:一个是ObjectDataProvider//用linq方法拿到SQL data,wrap到一个IEnumerablepublic IEnumerable GetAllCustomersAsList() { var items = from cust in this.Customers orderby cust.LastName select cust; return items.ToList(); }View Code //xaml里定... 阅读全文
posted @ 2013-09-19 13:44 若愚Shawn 阅读(247) 评论(0) 推荐(0) 编辑