Hy.
I am using XamDockManager on which I add ContentPanes with different functionalities. For every ContentPane that I add I would like to have a different tooltip, but I don't know how to set the tooltip for the header of the ContentPane. How can this be done in code? The ContentPane has a property called ToolTip but this does not show the tooltip when you go over the header of the ContentPane.
Thanks very much for any suggestion.
Nico
Hy Andrew.
Thanks very much for the answer. I tried this example with the DataTemplate for the header of the ContentPane but the ToolTip for the TextBlock it's not displayed. I have no idea why.
ToolTip is a property defined on FrameworkElement so pretty much every element has this property. The ContentPane ultimately derives from FrameworkElement so it has this property. When you set an element's ToolTip, the WPF framework will show it whenever you hover anywhere over that element - assuming you don't hover over an element within it that has a tooltip (like the caption buttons). The element that represents the caption is the PaneHeaderPresenter so if you don't want these tooltips then you will probably have to retemplate that element so that it doesn't set the ToolTip on its buttons.If you just want a tooltip on the caption when not over the buttons, you probably need to retemplate the ContentPane and set the ToolTip on the PaneHeaderPresenter in its template. Another possibility instead of the latter would be to set the HeaderTemplate of the ContentPane to a DataTemplate that has a TextBlock in it with its tooltip property set.e.g. I'm just binding to the Name property of the pane but you could bind to something else.