What is considered the best way of enabling or disabling multiple controls in Silverlight at the same time (textbox, combobox, autocompletebox and the like)?
I suppose I could bind the "IsEnabled" property of each control to a boolean property. That property only exists for interactive controls and not textblocks.
I could loop through the children recursively and set their properties appropriately, but that seems inelegant.
Ideally, I'd like to just set some disable-like property on the parent container of the controls, giving even the TextBlocks a disabled look similar to a Windows form.
Is there a way to just disable the parent container?
Use the ContentControl Silverlight provides.
<ContentControl x:Name="GroupOfControls" >...Your controls...</ContentControl>
//Enable and Disable
GroupOfControls.IsEnabled = false;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With