I've got a simple text block with a label and text box as content. I would like to bind the IsEnabled property of the text block to a property on my view model. For whatever reason the label and text box stay disabled even though the IsEnabled property is changing properly on the view model.
Anyone know what's going on here?
This doesn't work:
<TextBlock IsEnabled="{Binding Path=IsEnabledProperty}">
<Label Content="Test"/>
<TextBox Text="blah"/>
</TextBlock>
This works just fine:
<TextBlock>
<Label IsEnabled="{Binding Path=IsEnabledProperty}" Content="Test"/>
<TextBox IsEnabled="{Binding Path=IsEnabledProperty}" Text="blah"/>
</TextBlock>
Is it just a bad idea to use TextBlock like this?