{"id":1530,"date":"2023-05-28T17:15:27","date_gmt":"2023-05-28T09:15:27","guid":{"rendered":"https:\/\/sanlangcode.com\/?p=1530"},"modified":"2023-05-28T17:15:27","modified_gmt":"2023-05-28T09:15:27","slug":"%e3%80%90xaml%e3%80%91material-design-in-xaml-toolkit-%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/sanlangcode.com\/index.php\/2023\/05\/28\/%e3%80%90xaml%e3%80%91material-design-in-xaml-toolkit-%e4%bd%bf%e7%94%a8\/","title":{"rendered":"\u3010XAML\u3011Material Design in XAML Toolkit \u4f7f\u7528"},"content":{"rendered":"\n<p>github\u5730\u5740\uff1a<a href=\"https:\/\/github.com\/MaterialDesignInXAML\/MaterialDesignInXamlToolkit\">https:\/\/github.com\/MaterialDesignInXAML\/MaterialDesignInXamlToolkit<\/a><\/p>\n\n\n\n<p>1.\u9996\u5148NuGet\u5b89\u88c5MaterialDesignInXamlToolkit<\/p>\n\n\n\n<p>2.. \u914d\u7f6e App.xaml<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;Application . . .\n    xmlns:materialDesign=\"http:\/\/materialdesigninxaml.net\/winfx\/xaml\/themes\">\n    &lt;Application.Resources>\n        &lt;ResourceDictionary>\n            &lt;ResourceDictionary.MergedDictionaries>\n                &lt;materialDesign:BundledTheme BaseTheme=\"Light\" PrimaryColor=\"DeepPurple\" SecondaryColor=\"Lime\" \/>\n                &lt;ResourceDictionary Source=\"pack:\/\/application:,,,\/MaterialDesignThemes.Wpf;component\/Themes\/MaterialDesignTheme.Defaults.xaml\" \/>\n            &lt;\/ResourceDictionary.MergedDictionaries>\n        &lt;\/ResourceDictionary>\n    &lt;\/Application.Resources>\n&lt;\/Application><\/code><\/pre>\n\n\n\n<p>3.\u914d\u7f6eMainWindow.xaml\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;Window . . .\n        xmlns:materialDesign=\"http:\/\/materialdesigninxaml.net\/winfx\/xaml\/themes\"\n        TextElement.Foreground=\"{DynamicResource MaterialDesignBody}\"\n        TextElement.FontWeight=\"Regular\"\n        TextElement.FontSize=\"13\"\n        TextOptions.TextFormattingMode=\"Ideal\" \n        TextOptions.TextRenderingMode=\"Auto\"        \n        Background=\"{DynamicResource MaterialDesignPaper}\"\n        FontFamily=\"{DynamicResource MaterialDesignFont}\">\n    &lt;Grid>\n        &lt;StackPanel>\n            &lt;materialDesign:Card Padding=\"32\" Margin=\"16\">\n                &lt;TextBlock Style=\"{DynamicResource MaterialDesignHeadline6TextBlock}\">My First Material Design App&lt;\/TextBlock>\n            &lt;\/materialDesign:Card>\n        &lt;\/StackPanel>\n    &lt;\/Grid>\n&lt;\/Window><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/sanlangcode.com\/wp-content\/uploads\/2023\/05\/image-9.png\" alt=\"\" class=\"wp-image-1531\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>github\u5730\u5740\uff1ahttps:\/&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[],"class_list":["post-1530","post","type-post","status-publish","format-standard","hentry","category-xaml"],"_links":{"self":[{"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/posts\/1530","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/comments?post=1530"}],"version-history":[{"count":0,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/posts\/1530\/revisions"}],"wp:attachment":[{"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/media?parent=1530"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/categories?post=1530"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/tags?post=1530"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}