{"action":"created","issue":{"url":"https://api.github.com/repos/firstfloorsoftware/mui/issues/62","labels_url":"https://api.github.com/repos/firstfloorsoftware/mui/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/firstfloorsoftware/mui/issues/62/comments","events_url":"https://api.github.com/repos/firstfloorsoftware/mui/issues/62/events","html_url":"https://github.com/firstfloorsoftware/mui/issues/62","id":106226420,"number":62,"title":"How to change the alignment of the DataGrid Column header","user":{"login":"luni64","id":12611497,"avatar_url":"https://avatars.githubusercontent.com/u/12611497?v=3","gravatar_id":"","url":"https://api.github.com/users/luni64","html_url":"https://github.com/luni64","followers_url":"https://api.github.com/users/luni64/followers","following_url":"https://api.github.com/users/luni64/following{/other_user}","gists_url":"https://api.github.com/users/luni64/gists{/gist_id}","starred_url":"https://api.github.com/users/luni64/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luni64/subscriptions","organizations_url":"https://api.github.com/users/luni64/orgs","repos_url":"https://api.github.com/users/luni64/repos","events_url":"https://api.github.com/users/luni64/events{/privacy}","received_events_url":"https://api.github.com/users/luni64/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-13T16:41:02Z","updated_at":"2015-10-12T06:59:48Z","closed_at":null,"body":"How can I change the alignmnet of the column header of a m:ui datagrid? The default centered alignment doesn't look very nice for broad colums\r\n\r\n![image](https://cloud.githubusercontent.com/assets/12611497/9837613/7196ba34-5a45-11e5-9510-18449e95ce23.png)\r\n\r\nIf I restyle it by something like\r\n```C#\r\n<Style TargetType=\"DataGridColumnHeader\">\r\n        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n </Style>\r\n```\r\nI loose all of the nice m:ui styling for the header. I guess I need to add a  `BasedOn=XXX` in the style definition but how can I refere to the m:ui style?"},"comment":{"url":"https://api.github.com/repos/firstfloorsoftware/mui/issues/comments/147303996","html_url":"https://github.com/firstfloorsoftware/mui/issues/62#issuecomment-147303996","issue_url":"https://api.github.com/repos/firstfloorsoftware/mui/issues/62","id":147303996,"user":{"login":"FuchsiaSoft","id":6933750,"avatar_url":"https://avatars.githubusercontent.com/u/6933750?v=3","gravatar_id":"","url":"https://api.github.com/users/FuchsiaSoft","html_url":"https://github.com/FuchsiaSoft","followers_url":"https://api.github.com/users/FuchsiaSoft/followers","following_url":"https://api.github.com/users/FuchsiaSoft/following{/other_user}","gists_url":"https://api.github.com/users/FuchsiaSoft/gists{/gist_id}","starred_url":"https://api.github.com/users/FuchsiaSoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FuchsiaSoft/subscriptions","organizations_url":"https://api.github.com/users/FuchsiaSoft/orgs","repos_url":"https://api.github.com/users/FuchsiaSoft/repos","events_url":"https://api.github.com/users/FuchsiaSoft/events{/privacy}","received_events_url":"https://api.github.com/users/FuchsiaSoft/received_events","type":"User","site_admin":false},"created_at":"2015-10-12T06:59:48Z","updated_at":"2015-10-12T06:59:48Z","body":"Try this:\r\n```xaml\r\n            <DataGrid>\r\n                <DataGrid.ColumnHeaderStyle>\r\n                    <Style TargetType=\"DataGridColumnHeader\" BasedOn=\"{StaticResource {x:Type DataGridColumnHeader}}\">\r\n                        <Setter Property=\"HorizontalContentAlignment\" Value=\"Left\"/>\r\n                    </Style>\r\n                </DataGrid.ColumnHeaderStyle>\r\n                <DataGrid.Columns>\r\n                    <!-- Columns and rest of content here -->\r\n                </DataGrid.Columns>\r\n            </DataGrid>\r\n```\r\n\r\nI did try just doing a derived style with a global scope in App.xaml, but got some strange results.\r\n\r\nGenerally speaking though deriving from mui styles is pretty straightforward, it's covered in their wiki here:  [Deriving from MUI styles](https://github.com/firstfloorsoftware/mui/wiki/Derive-from-MUI-styles)"}}