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 was hoping that there would be a way to setup a custom header template. The most common scenario that I have is wanting to wrap wide heading text. For this, all I would need is for the TextBlock (I'm assuming that is was is being used) to set the TextWrapping property to WrapWithOverflow. Really, I am going to need a way to specify a DataTemplate for the column header. I'm not sure if you currently support data templates for row headers or not, but that would be nice in the future. If you have any suggestions on wrapping text in the column headings, I'd be happy to hear whatever ideas you have. Thanks! |
|
|
Hello Jared The next nightly build will include a ColumnHeaderTemplate property on the DataGrid. You can use this to specify a header content template for all columns. The data context of the template will be the Header string. If you needed, you could use triggers to have a different template for certain columns. Here is an example template that includes text wrapping. This uses the default margin and sets IsHitTestingVisible to false so the mouse can reach the column header itself.
The DataGrid also already supports row header templates through the similar DataGrid.RowHeaderTemplate property. Jason Fauchelle |
|
|
Perfect! That's exactly what I was looking for...thank you! You guys have sure earned a loyal customer because of your great service. Thanks again Jason! |
|