Created
October 17, 2013 11:46
-
-
Save DanSearle/7023487 to your computer and use it in GitHub Desktop.
IsEnabled binding of a user control
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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