日期:2014-05-18  浏览次数:20710 次

在wpf中怎样动态设置datagrid的某一个单元格的背景颜色
在listview中也可以,谢谢了,就急啊

------解决方案--------------------
C# code
public class TestModel : DependencyObject
    {
        public string Test
        {
            get
            {
                return ((string)(GetValue(TestProperty)));
            }
            set
            {
                SetValue(TestProperty, value);
            }
        }
        /// <summary>
        /// Using a DependencyProperty as the backing store for BondSecurityNameForBinding.  This enables animation, styling, binding, etc...
        /// </summary>
        public static DependencyProperty TestProperty = DependencyProperty.Register("Test", typeof(string), typeof(TestModel));
    }