摘要:
1.动态创建XAML对象StringBuilderxaml=newStringBuilder();xaml.Append("<TextBlock");xaml.Append("xmlns=\"http://schemas.microsoft.com/client/2007\"");xaml.Append("FontSize=\"50\"");xaml.Append("FontWeight=\"Bold\"Text=\"动态创建XAML对象\" 阅读全文
摘要:
1.验证TextBox内容不超过指定长度,失去焦点后验证。前台:<TextBoxName="tb1"Text="{BindingName,Mode=TwoWay,ValidatesOnExceptions=True}"Height="100"Width="100"/>后台:Personp=newPerson();publicMainPage(){InitializeComponent();p.Name="123";tb1.DataContext=p;}publicclassPerso 阅读全文