Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
115
change the alignment of the header row
posted

Hi,

I would like to make the contents of header row vertical. This will save me space, since the header takes up a lot of space. Every other row would be as before, that is horizontal text. How would I achieve this?

Parents
No Data
Reply
  • 35319
    Verified Answer
    posted

    Hello,

     

    I have been looking into your question and you can create a style for the LabelPresenter where to set the a vertical TextBlock in the ContentPresenter. Also you need to set the ‘Width’ property to “Auto”. I am attaching a sample application(DataGridVerticalHeaders.zip) that shows my approach.

     

    Let me know, if you need any further assistance on this matter.

     

    DataGridVerticalHeaders.zip
Children