DataTrigger for Visibility of a control inside a DataTemplate not working DataTrigger for Visibility of a control inside a DataTemplate not working wpf wpf

DataTrigger for Visibility of a control inside a DataTemplate not working


The Visibility="Hidden" that you explicitly set on the TextBlock is overriding whatever the Style does. Style is applied first, then finally explicit assignments in the tag attributes are applied. This makes sense: If you have a global TextBlock style and you set properties on an individual TextBlock, you want the global values for those properties to be overridden.