This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I extensively use a customized version of the Microsoft ListView control. One of the customization I have made is that I have a subclass of GridViewColumn that adds a HeaderToolTip property. To implement the tool tip I set the ColumnHeaderContainerStyle to show the tool tip with the setter
and also replace the control template so it displays a red "flag" in the upper right corner of the header to alert the user that there is a tooltip. I am also now using the Mindscape MulticolumnTreeView, and since is also uses the GridViewColumn and ColumnHeaderContainerStyle I was hoping I could use the same technique. However, I find it doesn't work because the MulticolumnTreeView does not directly use the GridViewColumn I specify, but creates new GridViewColumns internally (in CreateBaseColumn) so that my HeaderToolTip property is lost. I can't see any way to implement header tool tips except by defining the HeaderTemplate of each column. I wouldn't mind this except that I would have to define a different HeaderTemplate for each column just to change the tooltip text because I can't figure out any way to bind to my HeaderToolTip property (because my subclass GridViewColumn doesn't seem accessible in the visual tree). So I was wondering if you can recommend any way to get header tool tips with the MulticolumnTreeView without defining a different HeaderTemplate for each column. Peter |
|
|
Hi Peter, Apologies for the trouble here. I've had a look at making your custom GridViewColumn objects accessible from the wrapper columns, but couldn't find a good way of doing it without risking breaking changes. I am wondering, would you be able to provide both the header value and the tooltip value within the Header property of your GridViewColumns? The Header property gets bound to the wrapper Header, so whatever value you set will be used. You might be able to either set the Header to be an object containing Header and ToolTip properties and then bind those properties in your template/style, or you could have both the header and tooltip in a single string with an appropriate separator, and then use converters on the header and tooltip bindings to pull out the one you need. A bit of a hack, but better than creating a whole new template for every column. Hope that helps, let me know if you have questions about any of this. -Jason Fauchelle |
|