Between keeping up with what’s coming for .Net 4.0 as well as the end of a large DOD contract I’ve been a bit busy (and no developer fatigue, just busy :)). But don’t fret loyal readers, more will be coming soon.

Until then here is a bit of xaml for self-referencing bindings.

  Foreground="{StaticResource ActiveTabForeground}"
  ToolTip="{Binding RelativeSource={RelativeSource Self}, Path=Text}"     

As you can see I often use these with TextBlocks where I’m using text trimming. The reason being that, with text trimming, the text gets cut short if it exceeds the width of the textblock. This way users will be able to mouse over the textblock and get the tooltip containing the full value.

Where else would this be useful? Well, um, I don’t know since I only use this with tooltips on TextBlocks. But it is certainly helpful for that.


Leave a Reply

Your email address will not be published. Required fields are marked *


928 East Plymouth Drive Asbury Park, NJ 07712