由网友(沒了以後.)分享简介:什么是自动灰出一个文本框,最好的办法,如果未选中它相关的单选按钮? 我有一个open 的问题进行再利用的依赖属性(我没有工作),对于这一点,但我不知道这是适当的做法。当单选1,选择启用文本字段因此,基本上,但是选择的话,当单选按钮2的文本框应该得到未启用。解决方案 <单选X:名称=RadioButton2/&...
什么是自动灰出一个文本框,最好的办法,如果未选中它相关的单选按钮?
我有一个open 的问题进行再利用的依赖属性(我没有工作),对于这一点,但我不知道这是适当的做法。当单选1,选择启用文本字段因此,基本上,但是选择的话,当单选按钮2的文本框应该得到未启用。
解决方案 <单选X:名称=RadioButton2/>
<文本框的IsEnabled ={结合器isChecked,的ElementName = RadioButton2}/>
What's the best approach to auto-grey-out a textbox if it's associated radiobutton is not selected?
I've got an open question out re using a dependency property (which I haven't got working) for this, however I'm not sure this is the appropriate approach. So basically when RadioButton 1 is selected the text field is enabled, however when RadioButton 2 is selected then the textfield should got NOT enabled.
解决方案<RadioButton x:Name="RadioButton2" />
<TextBox IsEnabled="{Binding IsChecked, ElementName=RadioButton2}" />
相关推荐
最新文章