wpf 自定义属性的默认值


public int MaxSelectCount
{
get { return (int)GetValue(MaxSelectCountProperty); }
set { SetValue(MaxSelectCountProperty, value);
txtMaxCount.Text = value.ToString(); }
}

//200默认值
public static readonly DependencyProperty MaxSelectCountProperty = DependencyProperty.RegisterAttached("MaxSelectCount", typeof(int), typeof(HzPostionListGroupSelect), new FrameworkPropertyMetadata(200));

posted on 2018-04-23 13:51  Shine-Zhong  阅读(646)  评论(0编辑  收藏  举报

导航