新建C#的wpf用户控件库项目
绘制界面,编写代码
private string _text;
public string text
{
get { return _text; }
set { _text = value; NotifyPropertyChanged(); }
}
private void NotifyPropertyChanged()
{
this.buttext.Content = _text;
}
生成解决方案
新建wpf项目
添加控件
代码:
MessageBox.Show(control1.text);
this.control1.text = "改变控件文字";




1万+

被折叠的 条评论
为什么被折叠?



