{"id":247,"date":"2013-04-08T10:05:28","date_gmt":"2013-04-08T10:05:28","guid":{"rendered":"http:\/\/putridparrot.com\/blog\/?p=247"},"modified":"2015-06-04T08:45:44","modified_gmt":"2015-06-04T08:45:44","slug":"mahapps-metro","status":"publish","type":"post","link":"https:\/\/putridparrot.com\/blog\/mahapps-metro\/","title":{"rendered":"Quick Start &#8211; MahApps Metro"},"content":{"rendered":"<p>I discovered the excellent <a title=\"MahApps Metro\" href=\"https:\/\/github.com\/MahApps\/MahApps.Metro\" target=\"_blank\">MahApps Metro<\/a> libraries a while back but it wasn&#8217;t until I started using <a title=\"github:windows\" href=\"http:\/\/windows.github.com\/\" target=\"_blank\">github:Windows<\/a>\u00a0that I was inspired to really start using this excellent library.<\/p>\n<p>Basically MahApps Metro offers a bunch of styles and controls which duplicate aspects of Windows 8 UI but ofcouse they can be used on non-Windows 8 versions of Windows. For example, I have code on both WinXP and Windows 7 using these libraries and they look great.<\/p>\n<p>This post is just a quick &#8220;how to quickly get up and running&#8221; with MahApps.<\/p>\n<ul>\n<li>Let&#8217;s start by creating a WPF Application in Visual Studio.<\/li>\n<li>Now using NuGet type MahApps.Metro into the search box of NuGet and install MahApps.Metro<\/li>\n<li>In the MainWindow.xaml.cs change the base class from Window to MetroWindow and add\u00a0using MahApps.Metro.Controls;<\/li>\n<li>In the MainWindow.xaml change Window to MetroWindow add the namespace if need be (for example\u00a0xmlns:Controls=&#8221;clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro&#8221;)<\/li>\n<li>Finally add A Window.Resources section to the MainWindow.xaml file as per the code below to enable the Metro styles<\/li>\n<\/ul>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;Window.Resources&gt;\r\n   &lt;ResourceDictionary&gt;\r\n      &lt;ResourceDictionary.MergedDictionaries&gt;\r\n         &lt;ResourceDictionary Source=&quot;pack:\/\/application:,,,\/MahApps.Metro;component\/Styles\/Colours.xaml&quot; \/&gt;\r\n         &lt;ResourceDictionary Source=&quot;pack:\/\/application:,,,\/MahApps.Metro;component\/Styles\/Fonts.xaml&quot; \/&gt;\r\n         &lt;ResourceDictionary Source=&quot;pack:\/\/application:,,,\/MahApps.Metro;component\/Styles\/Controls.xaml&quot; \/&gt;\r\n         &lt;ResourceDictionary Source=&quot;pack:\/\/application:,,,\/MahApps.Metro;component\/Styles\/Accents\/Blue.xaml&quot; \/&gt;\r\n         &lt;ResourceDictionary Source=&quot;pack:\/\/application:,,,\/MahApps.Metro;component\/Styles\/Accents\/BaseLight.xaml&quot; \/&gt;\r\n      &lt;\/ResourceDictionary.MergedDictionaries&gt;\r\n   &lt;\/ResourceDictionary&gt;\r\n&lt;\/Window.Resources&gt;\r\n<\/pre>\n<p>Note: After installing MahApps.Metro using NuGet the page <a title=\"http:\/\/mahapps.com\/MahApps.Metro\/\" href=\"http:\/\/mahapps.com\/MahApps.Metro\/\" target=\"_blank\">http:\/\/mahapps.com\/MahApps.Metro\/<\/a> is displayed, it contains the steps above plus more so obviously read that for a fuller explanation. I&#8217;ve written these steps out just to show the bare minimum I need to do to get started.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I discovered the excellent MahApps Metro libraries a while back but it wasn&#8217;t until I started using github:Windows\u00a0that I was inspired to really start using this excellent library. Basically MahApps Metro offers a bunch of styles and controls which duplicate aspects of Windows 8 UI but ofcouse they can be used on non-Windows 8 versions [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3,65,13],"tags":[],"class_list":["post-247","post","type-post","status-publish","format-standard","hentry","category-c","category-mahapps","category-wpf"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/comments?post=247"}],"version-history":[{"count":8,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/247\/revisions"}],"predecessor-version":[{"id":3228,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/247\/revisions\/3228"}],"wp:attachment":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/media?parent=247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/categories?post=247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/tags?post=247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}