17,740
社区成员
发帖
与我相关
我的任务
分享
public class cccssss: DependencyObject
{
static List<string> Vs = new List<string>();
static cccssss()
{
Vs.Add("885588");
}
public List<string> Ceshi
{
get { return (List<string>)GetValue(CeshiProperty); }
set { SetValue(CeshiProperty, value); }
}
// Using a DependencyProperty as the backing store for ceshi. This enables animation, styling, binding, etc...
public static readonly DependencyProperty CeshiProperty =
DependencyProperty.Register("ceshi", typeof(List<string>), typeof(cccssss), new PropertyMetadata(Vs));
}
如果都用add就会同一个数据源
如果用“=”赋值 就不会同步了
满是疑惑呀 求解