{"id":3455,"date":"2016-10-17T21:26:00","date_gmt":"2016-10-17T21:26:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/premier_developer\/?p=3455"},"modified":"2019-02-14T20:27:52","modified_gmt":"2019-02-15T03:27:52","slug":"new-project-type-has-xaml-forms-by-default","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/premier-developer\/new-project-type-has-xaml-forms-by-default\/","title":{"rendered":"New project type has XAML forms by default"},"content":{"rendered":"<p><em>Recently on his blog, Premier Developer Consultant <a href=\"https:\/\/social.msdn.microsoft.com\/profile\/jhealy\">Joe Healy<\/a> highlighted some new templates available to Xamarin developers in Visual Studio.\u00a0 See below for the full article, but also be sure to check out Joe\u2019s <a href=\"https:\/\/blogs.msdn.microsoft.com\/devfish\/\">DevFish<\/a> blog for lots more great content!<\/em><\/p>\n<hr \/>\n<p>Xamarin has some great documentation. The article at [ <a href=\"https:\/\/developer.xamarin.com\/guides\/xamarin-forms\/xaml\/xaml-basics\/getting_started_with_xaml\/\">https:\/\/developer.xamarin.com\/guides\/xamarin-forms\/xaml\/xaml-basics\/getting_started_with_xaml\/<\/a> ] shows how to get started with Xaml by using the <strong>Blank Xaml App ( Xamarin.Forms Portable )<\/strong> template.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/blank-app-portable.png\"><img decoding=\"async\" width=\"512\" alt=\"Xamarin New Forms Portable\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/blank-app-portable.png\" \/><\/a><\/p>\n<p>Xamarin New Forms Portable<\/p>\n<p>The Blank Xaml App template sets up a project without any Xaml, just C# classes for creating a Xamarin Forms project. You must manually add a Xaml Page to this template, as this article shows [ <a href=\"https:\/\/developer.xamarin.com\/guides\/xamarin-forms\/xaml\/xaml-basics\/getting_started_with_xaml\/\">https:\/\/developer.xamarin.com\/guides\/xamarin-forms\/xaml\/xaml-basics\/getting_started_with_xaml\/<\/a>].<\/p>\n<p>In my article at [ <a href=\"https:\/\/blogs.msdn.microsoft.com\/devfish\/2016\/06\/24\/global-resources-in-xamarin-forms-no-app-xaml-create-one\/\">https:\/\/blogs.msdn.microsoft.com\/devfish\/2016\/06\/24\/global-resources-in-xamarin-forms-no-app-xaml-create-one\/<\/a>] I show how to add an App.Xaml to the Blank Xaml App template as well.\u00a0 App.xaml using xml gives a developer Xaml based resources and style definitions, imho a much cleaner and manageable approach than C# based repositories.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/blank-xaml-app.png\"><img decoding=\"async\" width=\"512\" alt=\"Xamarin New Forms PCL App\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/31\/2019\/04\/blank-xaml-app-1024x716.png\" \/><\/a><\/p>\n<p>Xamarin New Forms PCL App<\/p>\n<p>Manually adding in XAML pages works very well.\u00a0 Functional? Yes! Tedious, absolutely.Wish there was an easier way?\u00a0 Of course.<\/p>\n<p>Good news. XAML templates are here.<\/p>\n<p>Update your Xamarin to at least Xamarin 4.1, and new\u00a0 templates are available. My very favorit-est is the <strong>Blank Xaml App ( Xamarin.Forms Portable ).<\/strong> <strong>Blank Xaml App<\/strong> versus <strong>Blank App<\/strong>? <strong>Blank Xaml App<\/strong> gives us <strong>App.Xaml<\/strong> and <strong>App.Xaml.cs<\/strong>, as well as <strong>MainPage.xaml<\/strong> and <strong>MainPage.Xaml.cs<\/strong> files.<\/p>\n<p>Developers no longer have to have to manually add in the Xaml page, or an App.Xaml . Great news for those of us who prefer the pointy thing approach &lt; xaml \/&gt; to form layout versus C# driven.<\/p>\n<p>Prior to Xamarin 4.1 we were forced to use the Xaml App template with manually added XAML forms if we wanted to use XAML instead of code.<\/p>\n<p>Note this is also available in <strong>Xamarin Studio on the Mac<\/strong>, via the<strong> File &gt; New &gt; Solution &gt; Xamarin.Forms &gt; Forms App<\/strong>.\u00a0\u00a0 Keep a sharp watch, as the default page in Xamarin STudio for Mac will match the name of the project instead of being \u201cMainPage.xaml\u201d.<\/p>\n<p>Xamarin Forms keeps getting better. I can\u2019t wait to see where it goes. But in the meantime, the new default layout with Xaml based pages gives us pointy types a much better launchpad for our projects than the previous C# only options.<\/p>\n<p>Happy coding and tight lines!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently on his blog, Premier Developer Consultant Joe Healy highlighted some new templates available to Xamarin developers in Visual Studio.\u00a0 See below for the full article, but also be sure to check out Joe\u2019s DevFish blog for lots more great content! Xamarin has some great documentation. The article at [ https:\/\/developer.xamarin.com\/guides\/xamarin-forms\/xaml\/xaml-basics\/getting_started_with_xaml\/ ] shows how to [&hellip;]<\/p>\n","protected":false},"author":581,"featured_media":37840,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[86,3,46,88,89,399],"class_list":["post-3455","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-permierdev","tag-joe-healy","tag-team","tag-visual-studio","tag-xamarin","tag-xamarin-forms","tag-xaml"],"acf":[],"blog_post_summary":"<p>Recently on his blog, Premier Developer Consultant Joe Healy highlighted some new templates available to Xamarin developers in Visual Studio.\u00a0 See below for the full article, but also be sure to check out Joe\u2019s DevFish blog for lots more great content! Xamarin has some great documentation. The article at [ https:\/\/developer.xamarin.com\/guides\/xamarin-forms\/xaml\/xaml-basics\/getting_started_with_xaml\/ ] shows how to [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/3455","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/comments?post=3455"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/3455\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media\/37840"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media?parent=3455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/categories?post=3455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/tags?post=3455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}