Access Element inside Silverlight DataTemplate
问题 I have not been able to find a clean solution to the following problem even though there are a few related questions already on SO. If I have a data template that is being used multiple times, for example, a TreeViewItem.HeaderTemplate, how can I change something the template for only some of the TreeViewItems. For example, let's say my TVI HeaderTemplate has a textblock and depending on the string, I want to make the fontweight bold. I want to do something like this: ((TextBlock)myTreeView