摘要: 问题描述:TextBox绑定了值,但当没有输入的时候,显示未能转换值"" 解决方案:给绑定增加converter, <TextBox Text="{Binding Count, Converter={StaticResource countConverter}}" /> 要这样绑定先要写一个conv 阅读全文
posted @ 2020-09-22 13:25 养鼠的猫 阅读(1297) 评论(0) 推荐(0) 编辑
摘要: 只能输入数字的限制 在XAML文件里 <TextBox PreviewTextInput= "TextBox_PreviewTextInput"></TextBox> xaml.cs文件里 private void TextBox_PreviewTextInput(object sender, Te 阅读全文
posted @ 2020-09-22 10:32 养鼠的猫 阅读(3620) 评论(0) 推荐(0) 编辑