Random programming things I'd want to remember

Saturday, June 14, 2014

XAML: change an element's property based on another element's property

Another one for the power and beauty of XAML. This one allows one to change an element's state based on another element's state. Example:

<CheckBox x:Name="chb1" Content="Check/Uncheck this" />
<Button IsEnabled="{Binding ElementName=chb1, Path=IsChecked}" Content="Click here" />


No comments: