积极答复者
关于textbox 和 richeditbox IsReadOnly 属性设置的问题

问题
答案
-
你好 DreamDays,
>>有时候在 textbox 的 isreadonly 属性为true 的情况下 ,又可以弹出键盘 ,这是什么问题呢
为了解决你的问题,我自己创建了一个简单的WP8.1项目:
<StackPanel> <TextBox Name="tb1" IsReadOnly="{Binding IsReadOnly, UpdateSourceTrigger=PropertyChanged}" /> <RichEditBox Name="reb1" IsReadOnly="{Binding IsReadOnly, UpdateSourceTrigger=PropertyChanged}" /> <Button Content="Change Property" Click="Button_Click" /> <TextBlock Text="{Binding IsReadOnly, UpdateSourceTrigger=PropertyChanged}" /> </StackPanel>
后台定义了一个bool型的属性IsReadOnly, 实现了属性通知接口。
在模拟器和真机中,发现即使IsReadOnly设置为True,键盘还是会弹出,只是输入的内容不会显示在控件输入框中,重新设置为False后,可以弹出键盘正常输入。
对于你的现象,建议你用真机进行测试。
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已标记为答案 DreamDays 2014年12月2日 1:58
全部回复
-
你好 DreamDays,
>>有时候在 textbox 的 isreadonly 属性为true 的情况下 ,又可以弹出键盘 ,这是什么问题呢
为了解决你的问题,我自己创建了一个简单的WP8.1项目:
<StackPanel> <TextBox Name="tb1" IsReadOnly="{Binding IsReadOnly, UpdateSourceTrigger=PropertyChanged}" /> <RichEditBox Name="reb1" IsReadOnly="{Binding IsReadOnly, UpdateSourceTrigger=PropertyChanged}" /> <Button Content="Change Property" Click="Button_Click" /> <TextBlock Text="{Binding IsReadOnly, UpdateSourceTrigger=PropertyChanged}" /> </StackPanel>
后台定义了一个bool型的属性IsReadOnly, 实现了属性通知接口。
在模拟器和真机中,发现即使IsReadOnly设置为True,键盘还是会弹出,只是输入的内容不会显示在控件输入框中,重新设置为False后,可以弹出键盘正常输入。
对于你的现象,建议你用真机进行测试。
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已标记为答案 DreamDays 2014年12月2日 1:58
-
你好 DreamDays,
>>有时候在 textbox 的 isreadonly 属性为true 的情况下 ,又可以弹出键盘 ,这是什么问题呢
为了解决你的问题,我自己创建了一个简单的WP8.1项目:
<StackPanel> <TextBox Name="tb1" IsReadOnly="{Binding IsReadOnly, UpdateSourceTrigger=PropertyChanged}" /> <RichEditBox Name="reb1" IsReadOnly="{Binding IsReadOnly, UpdateSourceTrigger=PropertyChanged}" /> <Button Content="Change Property" Click="Button_Click" /> <TextBlock Text="{Binding IsReadOnly, UpdateSourceTrigger=PropertyChanged}" /> </StackPanel>
后台定义了一个bool型的属性IsReadOnly, 实现了属性通知接口。
在模拟器和真机中,发现即使IsReadOnly设置为True,键盘还是会弹出,只是输入的内容不会显示在控件输入框中,重新设置为False后,可以弹出键盘正常输入。
对于你的现象,建议你用真机进行测试。
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.