>Hi,
>Given, say, this binding in XAML:
<TextBox Width="200" Text="{Binding Path=SelectedItem.Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"></TextBox>
where 'SelectedItem' may or may not have a 'Text' property.
>
>It would be ideal to have some method of binding the 'IsEnabled' property so that the control was disabled if the binding fails but I can't think of a way of implementing this in a generic sort of way (I can't even find a way of detecting when the binding fails except by programatically monitoring the Trace - which is kludgy at best and certainly not something to use in production code)
>
>Any suggestions?
>Viv
Can't test right now... :-(
But... IIRC correctly when the binding fails in the above scenario the Text property will return null? (If not this idea won't work)
If it does bind to the text property with a null to Boolean converter and use that to set the IsEnabled property.
HTH