{"id":802,"date":"2019-02-14T16:59:19","date_gmt":"2019-02-14T16:59:19","guid":{"rendered":"https:\/\/ibex.tech\/windows-iot\/?p=802"},"modified":"2022-09-13T15:52:57","modified_gmt":"2022-09-13T14:52:57","slug":"styling-buttons","status":"publish","type":"post","link":"https:\/\/ibex.tech\/csharp\/uwp-programming-in-c\/buttons-uwp-programming-in-c\/styling-buttons","title":{"rendered":"Styling Button-Stylesheet"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>&lt;Button Style=\"{StaticResource btnToggle1}\" Canvas.Left=\"100\" Canvas.Top=\"200\" x:Name=\"btnMyButton\" Content=\"Test\" \/&gt;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;Style x:Key=\"btnToggle1\" TargetType=\"Button\"&gt;\n    &lt;Setter Property=\"Width\" Value=\"50\" \/&gt;\n    &lt;Setter Property=\"Height\" Value=\"30\" \/&gt;\n    &lt;Setter Property=\"Background\" Value=\"Yellow\" \/&gt;\n    &lt;Setter Property=\"Foreground\" Value=\"Green\"\/&gt;\n    &lt;Setter Property=\"BorderBrush\" Value=\"{ThemeResource SystemControlForegroundTransparentBrush}\" \/&gt;\n    &lt;Setter Property=\"BorderThickness\" Value=\"{ThemeResource ButtonBorderThemeThickness}\" \/&gt;\n    &lt;Setter Property=\"Padding\" Value=\"2,2,2,2\" \/&gt;\n    &lt;Setter Property=\"HorizontalAlignment\" Value=\"Left\" \/&gt;\n    &lt;Setter Property=\"VerticalAlignment\" Value=\"Center\" \/&gt;\n    &lt;Setter Property=\"FontFamily\" Value=\"Arial\" \/&gt;\n    &lt;Setter Property=\"FontWeight\" Value=\"Bold\" \/&gt;\n    &lt;Setter Property=\"FontSize\" Value=\"18\" \/&gt;\n    &lt;Setter Property=\"UseSystemFocusVisuals\" Value=\"True\" \/&gt;\n&lt;\/Style&gt;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[145],"tags":[],"class_list":["post-802","post","type-post","status-publish","format-standard","hentry","category-buttons-uwp-programming-in-c"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/802","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=802"}],"version-history":[{"count":1,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/802\/revisions"}],"predecessor-version":[{"id":1200,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/802\/revisions\/1200"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/media?parent=802"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/categories?post=802"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/tags?post=802"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}