Skip to content

Instantly share code, notes, and snippets.

@DanSearle
Created October 17, 2013 11:46
Show Gist options
  • Save DanSearle/7023487 to your computer and use it in GitHub Desktop.
Save DanSearle/7023487 to your computer and use it in GitHub Desktop.
IsEnabled binding of a user control
Instead of modifying a binding in some way (for example you can make it dependent on other control name as it is proposed in other answer) I would move separate the control which will be disabled and control where DataContext will be changed. For example:
<ContentControl IsEnabled="{Binding CanModify}" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
<localControls:TeamEmployeeSelector DataContext="{Binding Confidentiality}"/>
</ContentControl>
From http://stackoverflow.com/a/5444979/1260257
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment