读书人

在wpf中怎样动态设置datagrid的某一个

发布时间: 2012-05-03 14:06:56 作者: rapoo

在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));    } 

读书人网 >C#

热点推荐