views:

21

answers:

1

Hi,

I have a control data template. 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!

+1  A: 

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.

Hugo
I feel so stupid right now :P i tried just that but using opacity and wondered why i couldnt click through it... Thanks mate!
TerrorAustralis