August 21st, 2019

Xamarin.Forms 4.2.0 Hits GA & CollectionView Updates

Paul DiPietro
Program Manager

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.

Author

Paul DiPietro
Program Manager

Paul DiPietro is a Program Manager at Microsoft In his spare time, he enjoys keeping up with his favorite sports or playing video games, so long as as his cats and dogs aren't wreaking havoc.

16 comments

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

  • Aleksei Starkov

    Please focus on fixing annoying known old bugs instead Shell toy. Some problems have been known for 4-5 years and are still not fixed.

  • Mateusz Kierepka

    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? 

  • Ricardo Romão Soares

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

  • Ricardo Romão Soares

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

  • Hugo Ferreira

    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.

    • Steve Reilly

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

      Read more
    • Wolfgang Schneider

      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?

  • Robert Strand

    Awesome stuff, keeps getting better with every release!

  • Huy Dang

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

  • Eric Leija

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

  • ysmoradi

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