Apply opaque overlay to control
I have a control data te开发者_StackOverflow社区mplate. The viewmodel behind it has a property IsReadyForUse. When this property is false, i want a semi transparent overlay on the control. This overlay must prevent the user from editing any of the items on the control. Once the property goes back to True, the overlay should dissappear.
If someone could point me in the the right direction i can figure it out from there, but i am a little stuck at the moment. I know how to use template data triggers, but dont know what to make that trigger do :)
Thanks in advance!
You could create your overlay, and bind it's Visibility property to your ViewModel's IsReadyForUse property (make sure you implement INotifyPropertyChanged
), using the BooleanToVisibility converter. You could also bing the control's IsEnabled property to the same property in the ViewModel.
精彩评论