Xamarin.Forms 4.1.0 Stable Now Available

David Ortinau

Today we are happy to announce Xamarin.Forms 4.1 availability on NuGet. Our 3.0.0 series of releases focused heavily on growing Xamarin.Forms by filling in the gaps. We learned that this should be available by default and want to continue effectively growing Xamarin.Forms to best meet your needs and improve productivity. Thank you for filling out surveys, scheduling discussion time, sharing your projects, and collaborating through GitHub!

4.0.0 service releases with 4.1.0

This release combines the three 4.0.0 service releases with 4.1.0. Bringing dozens of additional quality improvements, a new CheckBox control (debuted in our preview post), and several enhancements from community contributions such as Map improvements.

Enhancing Maps

Now, capturing the location of a tap or click is as easy as subscribing to the OnMapClicked event added by Joe Manke. Take a look at this in action.

4.1 release includes OnMapClicked event

Take this example from Xappy (on GitHub). When you tap anywhere on the map canvas, the event returns the latitude and longitude of the tap. It then drops a new pin on that location.

<?xml version="1.0" encoding="UTF-8"?>
<ContentPage
    xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:maps="clr-namespace:Xamarin.Forms.Maps;assembly=Xamarin.Forms.Maps"
    xmlns:local="clr-namespace:Xappy;assembly=Xappy"
    Shell.NavBarIsVisible="False"
    Shell.TabBarIsVisible="False"
    x:Class="Xappy.Scenarios.MapPage">
    <Grid>
        <maps:Map
            x:Name="MyMap"
            IsShowingUser="true"
            MapType="Street"
            MapClicked="Handle_MapClicked" />
            ...

void Handle_MapClicked(object sender, MapClickedEventArgs e)
{

    MyMap.Pins.Add(
            new Pin
            {
                Position = new Position(e.Position.Latitude, e.Position.Longitude),
                Label = "Joe's Place"
            }
        );
    DisplayAlert("Joe Says:", $"Last MapClick: {e.Position.Latitude}, {e.Position.Longitude}", "Thanks");
}

What Other Controls and Features Are Missing?

This map enhancement and the checkbox certainly fell into the “High Priority” category for Xamarin.Forms. Do you have other examples of features or even controls that you feel should just be there? Perhaps you are already writing custom renderers or effects for these types of things. We’d love to know! Please share your insight here.

Xamarin Show

To learn more about the features of this release, check out the full 4.1.0 release notes. Also, watch this Xamarin Show with me and James Montemagno.

Get Updating to Xamarin.Forms 4.1.0

To get started, launch your favorite NuGet package manager. Install the latest Xamarin.Forms into your projects. Use the Microsoft documentation guides to help with the installation steps.

Then browse through all of the latest documentation for Xamarin.Forms 4.1 including CheckBox, Device helpers, and Maps.

Find something amiss or have general feedback? Please take a minute to log an issue via Visual Studio feedback, or by opening an issue in the Xamarin.Forms GitHub.

Happy coding!

1 comment

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

  • Cristian Ramos 0

    Hello good morning, I would like to know if you know an easy way to log in with facebook and google, if you have any link or tutorial

Feedback usabilla icon