What's the best approach to auto-grey-out a textbox if it's ass开发者_运维百科ociated 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}" />
精彩评论