Xamarin.Forms 4.2.0 Hits GA & CollectionView Updates

Paul DiPietro

Today, we are excited to announce that Xamarin.Forms 4.2.0 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.

Shell Lifecycle (PR)

Since it’s launch in Xamarin.Forms 4.0.0, Shell 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 BaseShellItem for Appearing and Disappearing along with new methods for OnAppearing and OnDisappearing.

Xamarin.Forms Shell Sample

Community Contributions

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 GitHub.

Here is a before and after with Andrew’s new FontImage markup extension:

Before:

<ImageButton>
    <ImageButton.Source>
        <FontImageSource
            FontFamily="{StaticResource MyFontFamily}"
            Glyph="{StaticResource SmileFace}"
            Color="{StaticResource PrimaryColor}" />
    </Image.Source>
</ImageButton>

After:

<ImageButton Source="{FontImage FontFamily={StaticResource MyFontFamily}, 
             Glyph={StaticResource SmileFace},
             Color={StaticResource White}" />

Tizen Enhancements

Also, a huge shout out to the Samsung team and community members who made these contributions to Xamarin.Forms 4.2.0 Tizen Support.

  • Add CheckBox (PR
  • Checkbox for Tizen

  • Visual (PR)
  • Support to TabbedPage.BarTextColor, SelctedTabColor, UnselecedTabColor (PR)

CollectionView Development Continues

Our roadmap listed the new CollectionView for official release in Xamarin.Forms 4.2.0. Your feedback during the CollectionView Challenge 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.

CollectionView Challenge Sample - Spotify Reproduction
Spotify Reproduction by luven1992


A lot of work has been finished to address feedback including header/footer templates(Android PR/iOS PR). Additionally, RefreshView, which is the basis for pull-to-refresh functionality, is in progress and is one of our current top priorities alongside CarouselView.

We’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, please report them on GitHub. You can also read the official spec on GitHub.

For more information, you can read the current docs as well as the original blog post. The 4.2.0 release includes some bug fixes as well as fuller functionality including grouping on iOS (PR).

Update to Xamarin.Forms 4.2 Today

For full details about Xamarin.Forms 4.2.0, check the release notes.

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 GitHub.

16 comments

Discussion is closed. Login to edit/delete existing comments.

  • Scott Kuhl 0

    Still waiting on Shell support on Windows.  Sigh.

    • Steve Chadbourne 0

      Yep it’s the one thing stopping me from using Shell. And CollectionView. Shame as they both look great.

  • Wolfgang Schneider 0

    A statement from Microsoft , if and when Shell will be available for UWP would be helpful.
    Currently I cannot  use Schell because a UWP  version is required.
    B.R Wolfgang

    • Marvin Heng 0

      exactly!

  • ysmoradi 0

    Shell for UWP + Xaml hot reload of xamarin forms pages in UWP

  • Eric Leija 0

    Great job, homies! I like the FontImage markup too! Will definitely tidy my codebase up.

  • Huy Dang 0

    I’m waiting for the scrolling events to loading more item 

  • Robert Strand 0

    Awesome stuff, keeps getting better with every release!

  • Hugo Ferreira 0

    Just for curious.
    Why do you guys, want new features as Shell supported on a dead horse as Windows Mobile ?No one cares about Windows Mobile anymore, not even Microsoft. 0 market share and disapear completly from the mobile globan ranking !Spending precious resources on supporting Windows Mobile is a non sense at this point.

    • Wolfgang Schneider 0

      Hugo
      Nobody is talking about Windows Mobile. We are talking about UWP which runns on Windows 10.
      Would it be nice to create a mobile App for iOS and Android which can runn on a Windows 10 tablet or desktop?

    • Steve Reilly 0

      You’re right, nobody cares about Windows Mobile or Windows Phones at all.  However, for those of us who are building mobile apps in corporate environments, the ability to produce a “work-alike” desktop/laptop executable from the same basic code base as the Android/iOS base is essential.  It doesn’t need to be Windows (a browser-based work-alike would be just as good) but the vast majority of our users have a Windows desktop/laptop + iPhone/Android phone, so Windows executables are fine for the most part.
      We have found that when we make a mobile app available within the organization, the majority of our users want to try it out on their laptops/desktops first – and only if they find it useful or appropriately matched to their needs will they deign to put it on their phones.  Getting user buy-in (and feedback) works significantly better if they can enter data or query results from either desktop or device, depending on where they are at.  Xamarin Forms works well for these scenarios, and we’d really like to use Shell and CollectionView, but they are shelfware to me until they can be used to produce a desktop/laptop work-alike…

  • Ricardo Romão Soares 0

    Hi, I have a doubt, I would only use a Shell.BackButtonBehavior if a set a override to iconOverride?

  • Ricardo Romão Soares 0

    Hi, I have a doubt, I would only use a Shell.BackButtonBehavior if I set a override to iconOverride?

  • Mateusz Kierepka 0

    Hi,
    Xamarin is well know to support iOS and Android, but now you are part of Microsoft. Is it correct sentence that Microsoft forgot about UWP? What is going on with XF that Samsung with Tizen is more focused on it than Microsoft by them selfs? I like XF, I like support from Xamarin, I don’t know why other teams from MS is not working with you? 

Feedback usabilla icon