{"id":1048,"date":"2020-04-29T19:25:25","date_gmt":"2020-04-29T18:25:25","guid":{"rendered":"https:\/\/ibex.tech\/windows-iot\/?p=1048"},"modified":"2020-04-29T19:25:25","modified_gmt":"2020-04-29T18:25:25","slug":"styling","status":"publish","type":"post","link":"https:\/\/ibex.tech\/csharp\/uwp-programming-in-c\/datagrid\/styling","title":{"rendered":"Styling"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Styling Columns<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;controls:DataGridTextColumn  &gt;\n    &lt;controls:DataGridTextColumn.HeaderStyle&gt;\n        &lt;Style TargetType=\"prim:DataGridColumnHeader\"&gt;\n            &lt;Style.Setters&gt;\n                &lt;Setter Property=\"HorizontalContentAlignment\" Value=\"Center\"\/&gt;\n                &lt;Setter Property=\"MinWidth\" Value=\"100\" \/&gt;\n                &lt;Setter Property=\"FontWeight\" Value=\"Bold\"\/&gt;\n            &lt;\/Style.Setters&gt;\n        &lt;\/Style&gt;\n    &lt;\/controls:DataGridTextColumn.HeaderStyle&gt;\n    &lt;controls:DataGridTextColumn.CellStyle&gt;\n        &lt;Style TargetType=\"controls:DataGridCell\"&gt;\n            &lt;Style.Setters&gt;\n                &lt;Setter Property=\"HorizontalAlignment\" Value=\"Right\"\/&gt;\n            &lt;\/Style.Setters&gt;\n        &lt;\/Style&gt;\n    &lt;\/controls:DataGridTextColumn.CellStyle&gt;\n&lt;\/controls:DataGridTextColumn&gt;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Text Align<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;controls:DataGridTextColumn  &gt;\n    &lt;controls:DataGridTextColumn.CellStyle&gt;\n        &lt;Style TargetType=\"controls:DataGridCell\"&gt;\n            &lt;Style.Setters&gt;\n                &lt;Setter Property=\"HorizontalAlignment\" Value=\"Right\"\/&gt;\n            &lt;\/Style.Setters&gt;\n        &lt;\/Style&gt;\n    &lt;\/controls:DataGridTextColumn.CellStyle&gt;\n&lt;\/controls:DataGridTextColumn&gt;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Styling Columns Text Align<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[113],"tags":[],"class_list":["post-1048","post","type-post","status-publish","format-standard","hentry","category-datagrid"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/1048","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/comments?post=1048"}],"version-history":[{"count":0,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/1048\/revisions"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/media?parent=1048"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/categories?post=1048"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/tags?post=1048"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}