{"id":44760,"date":"2019-08-21T14:00:01","date_gmt":"2019-08-21T21:00:01","guid":{"rendered":"http:\/\/devblogs.microsoft.com\/xamarin\/?p=44760"},"modified":"2020-04-30T04:43:08","modified_gmt":"2020-04-30T11:43:08","slug":"xamarin-forms-4-2-0-hits-ga-collectionview-updates","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/xamarin\/xamarin-forms-4-2-0-hits-ga-collectionview-updates\/","title":{"rendered":"Xamarin.Forms 4.2.0 Hits GA &#038; CollectionView Updates"},"content":{"rendered":"<p>Today, we are excited to announce that <a href=\"https:\/\/docs.microsoft.com\/xamarin\/xamarin-forms\/release-notes\/4.2\/4.2.0?WT.mc_id=forms420-xamarinblog-jamont\" rel=\"noopener noreferrer\" target=\"_blank\">Xamarin.Forms 4.2.0<\/a> is now available in stable. This release continues the 4.0 series with improvements to Shell, community enhancements, performance enhancements, and bug fixes. There are some sweet new enhancements that you can take advantage of right now in 4.2.0.<\/p>\n<h2>Shell Lifecycle (<a href=\"https:\/\/github.com\/xamarin\/Xamarin.Forms\/pull\/6527\">PR<\/a>)<\/h2>\n<p>Since it&#8217;s launch in Xamarin.Forms 4.0.0, <a href=\"https:\/\/docs.microsoft.com\/xamarin\/xamarin-forms\/app-fundamentals\/shell?WT.mc_id=forms420-xamarinblog-jamont\" rel=\"noopener noreferrer\" target=\"_blank\">Shell<\/a> has been a huge hit with developers. Shell gives you a way to simplify their application structure and navigation from a streamlined API. Xamarin.Forms 4.2.0 introduces new APIs to give you more control over the lifecycle of the pages in your app. This includes some brand new events implemented on the <code>BaseShellItem<\/code> for <code>Appearing<\/code> and <code>Disappearing<\/code> along with new methods for <code>OnAppearing<\/code> and <code>OnDisappearing<\/code>.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/08\/cats-large.png\" alt=\"Xamarin.Forms Shell Sample\" width=\"500\" class=\"aligncenter size-full wp-image-45155\" srcset=\"https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/08\/cats-large.png 840w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/08\/cats-large-300x270.png 300w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/08\/cats-large-768x691.png 768w\" sizes=\"(max-width: 840px) 100vw, 840px\" \/><\/p>\n<h2>Community Contributions<\/h2>\n<p>This release is also packed full of great community contributions. We want to thank everyone that has submitted an issue, pull request, or just commented on <a href=\"https:\/\/github.com\/xamarin\/xamarin.forms\" rel=\"noopener noreferrer\" target=\"_blank\">GitHub<\/a>.<\/p>\n<ul>\n<li>Switch ThumbColor (<a href=\"https:\/\/github.com\/xamarin\/Xamarin.Forms\/pull\/6312\">PR by @andreinitescu<\/a>)<\/li>\n<p><img decoding=\"async\" src=\"http:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/08\/Thumb.png\" alt=\"New Thumb Control\" width=\"374\" height=\"112\" class=\"aligncenter size-full wp-image-45157\" srcset=\"https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/08\/Thumb.png 374w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/08\/Thumb-300x90.png 300w\" sizes=\"(max-width: 374px) 100vw, 374px\" \/><\/p>\n<li>Color.ToHex() (<a href=\"https:\/\/github.com\/xamarin\/Xamarin.Forms\/pull\/6272\">PR by @DavidRoqueni<\/a>)<\/li>\n<li>FontImage Markup Extension for FontImageSource (<a href=\"https:\/\/github.com\/xamarin\/Xamarin.Forms\/pull\/6398\">PR by @ahoefling<\/a>)<\/li>\n<\/ul>\n<p>Here is a before and after with Andrew&#8217;s new FontImage markup extension:<\/p>\n<p><b>Before:<\/b><\/p>\n<pre class=\"prettyprint\">&#60;ImageButton&#62;\r\n    &#60;ImageButton.Source&#62;\r\n        &#60;FontImageSource\r\n            FontFamily=\"{StaticResource MyFontFamily}\"\r\n            Glyph=\"{StaticResource SmileFace}\"\r\n            Color=\"{StaticResource PrimaryColor}\" \/&#62;\r\n    &#60;\/Image.Source&#62;\r\n&#60;\/ImageButton&#62;<\/pre>\n<p><b>After:<\/b><\/p>\n<pre class=\"prettyprint\">&#60;ImageButton Source=\"{FontImage FontFamily={StaticResource MyFontFamily}, \r\n             Glyph={StaticResource SmileFace},\r\n             Color={StaticResource White}\" \/&#62;<\/pre>\n<h2>Tizen Enhancements<\/h2>\n<p>Also, a huge shout out to the Samsung team and community members who made these contributions to Xamarin.Forms 4.2.0 Tizen Support.<\/p>\n<ul>\n<li>Add CheckBox (<a href=\"https:\/\/github.com\/xamarin\/Xamarin.Forms\/pull\/6526\">PR<\/a><\/li>\n<p><img decoding=\"async\" src=\"http:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/08\/TizenCheckBox.png\" alt=\"Checkbox for Tizen\" width=\"116\" height=\"208\" class=\"aligncenter size-full wp-image-45159\" \/><\/p>\n<li>Visual (<a href=\"https:\/\/github.com\/xamarin\/Xamarin.Forms\/pull\/6204\">PR<\/a>)<\/li>\n<li>Support to TabbedPage.BarTextColor, SelctedTabColor, UnselecedTabColor (<a href=\"https:\/\/github.com\/xamarin\/Xamarin.Forms\/pull\/6183\">PR<\/a>)<\/li>\n<\/ul>\n<div><\/div>\n<h3>CollectionView Development Continues<\/h3>\n<p>Our roadmap listed the new <a href=\"https:\/\/docs.microsoft.com\/xamarin\/xamarin-forms\/user-interface\/collectionview?WT.mc_id=xf420-xamarinblog-jamont\" rel=\"noopener noreferrer\" target=\"_blank\">CollectionView<\/a> for official release in Xamarin.Forms 4.2.0. Your feedback during the <a href=\"https:\/\/devblogs.microsoft.com\/xamarin\/xamarin-forms-4-0-collectionview-challenge?WT.mc_id=xf420-xamarinblog-jamont\">CollectionView Challenge<\/a> was important in highlighting the features you need most. This included pull-to-refresh functionality, header\/footer templates, and several others. Development has come a long way, but we want to make sure you have the best possible experience when using CollectionView. So at this time we are going to keep CollectionView under the Experimental flag in this release.<\/p>\n<p><figure class=\"wp-caption aligncenter\" ><a href=\"https:\/\/github.com\/pauldipietro\/CollectionViewChallenge\/pull\/26\"><img decoding=\"async\" class=\"\" src=\"https:\/\/user-images.githubusercontent.com\/49949764\/56714151-865bd080-6766-11e9-8e45-30e7e0c8d6fc.png\" alt=\"CollectionView Challenge Sample - Spotify Reproduction\" width=\"408\" height=\"883\" \/><\/a><figcaption class=\"wp-caption-text\">Spotify Reproduction by luven1992<\/figcaption><\/figure><\/p>\n<p><br><\/p>\n<p>A lot of work has been finished to address feedback including header\/footer templates(<a href=\"https:\/\/github.com\/xamarin\/Xamarin.Forms\/pull\/6948\">Android PR<\/a>\/<a href=\"https:\/\/github.com\/xamarin\/Xamarin.Forms\/pull\/7094\">iOS PR<\/a>). Additionally, RefreshView, which is the basis for pull-to-refresh functionality, is in progress and is one of our current top priorities alongside CarouselView. <\/p>\n<p>We&#8217;d love for you to try out CollectionView if you have the time and let us know what you think. If you encounter any issues, <a href=\"https:\/\/github.com\/xamarin\/Xamarin.Forms\/issues\">please report them on GitHub<\/a>. You can also read the official spec <a href=\"https:\/\/github.com\/xamarin\/Xamarin.Forms\/issues\/3172\">on GitHub<\/a>.<\/p>\n<p>For more information, you can read the <a href=\"https:\/\/docs.microsoft.com\/\/xamarin\/xamarin-forms\/user-interface\/collectionview\/index?WT.mc_id=xf420-xamarinblog-jamont\">current docs<\/a> as well as the original <a href=\"https:\/\/devblogs.microsoft.com\/xamarin\/xamarin-forms-4-0-feature-preview-an-entirely-new-point-of-collectionview?WT.mc_id=xf420-xamarinblog-jamont\">blog post<\/a>. The 4.2.0 release includes some bug fixes as well as fuller functionality including grouping on iOS (<a href=\"https:\/\/github.com\/xamarin\/Xamarin.Forms\/pull\/6590\">PR<\/a>).<\/p>\n<h2>Update to Xamarin.Forms 4.2 Today<\/h2>\n<p>For full details about Xamarin.Forms 4.2.0, check the <a href=\"https:\/\/docs.microsoft.com\/en-us\/xamarin\/xamarin-forms\/release-notes\/4.2\/4.2.0?WT.mc_id=forms420-xamarinblog-jamont\">release notes<\/a>.<\/p>\n<p>You can update your existing projects via the NuGet Package Manager. As always, feedback is very welcome. Should you encounter any problems or have suggestions, please open an issue on <a href=\"https:\/\/github.com\/xamarin\/Xamarin.Forms\/issues\/new\/choose\">GitHub<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today have released Xamarin.Forms 4.2 for general availability, which is packed full of great new features for Shell and awesome community contributions that you are going to love.  Additionally, read up on the latest happenings with the development of CollectionView and it&#8217;s status. <\/p>\n","protected":false},"author":738,"featured_media":45155,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[5216,2,367],"tags":[6732,5,751,6,23,6149,16],"class_list":["post-44760","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-announcements","category-developers","category-xamarin-forms","tag-4-2-0","tag-android","tag-collectionview","tag-ios","tag-shell","tag-tizen","tag-xamarin-forms"],"acf":[],"blog_post_summary":"<p>Today have released Xamarin.Forms 4.2 for general availability, which is packed full of great new features for Shell and awesome community contributions that you are going to love.  Additionally, read up on the latest happenings with the development of CollectionView and it&#8217;s status. <\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts\/44760","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/users\/738"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/comments?post=44760"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts\/44760\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/media\/45155"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/media?parent=44760"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/categories?post=44760"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/tags?post=44760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}