tags:

views:

31

answers:

1

Hi,

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.

+1  A: 
<RadioButton x:Name="RadioButton2" />
<TextBox IsEnabled="{Binding IsChecked, ElementName=RadioButton2}" />
Jay
Got it thanks - seems simple when you see it :)
Greg