Xamarin.Forms 4.6.0.379-pre1 (4.6.0 Pre Release 1) Release Notes

Getting Started | What's New | Known Issues | Breaking Changes | API Changes | Blogs | Thank you | Feedback | Open Source

Summary

This release continues to improve existing features, while introducing a few significant feature contributions.

C# Markup Extensions

For developers that prefer to create UI in C#, a set of extension methods have been added to greatly reduce the more verbose aspects.

To get started, in your library project setup an App.cs with:

public class App : Application
{
	public App()
	{
	    Device.SetFlags(new string[] { "Markup_Experimental" });
	    MainPage = new MainPage();
	}
}

In the MainPage.cs you may then start creating your UI. For example, this introduces a Build method convention to set the page content.

public class MainPage : ContentPage
{
    public MainPage() => Build();

    void Build()
    {
        Content = new StackLayout()
        {
            Children = {
                new Label { Text = "Welcome to Xamarin.Forms!" }.CenterExpand()
            }
        };
    }
}

The code above uses the extension method CenterExpand to both center vertically and horizontally within the StackLayout.

RadioButton

This control is just what it sounds like, radio buttons! To group them together, provide a common GroupName.

void Build()
{
    Content = new StackLayout()
    {
        Padding = new Thickness(15),
        Children = {
            new Label {Text = "Choose a color:" }.Bold(),
            new RadioButton
            {
                GroupName = "Colors",
                Text = "Red",
                TextColor = Color.Red
            },
            new RadioButton
            {
                GroupName = "Colors",
                Text = "Green",
                TextColor = Color.Green
            },
            new RadioButton
            {
                GroupName = "Colors",
                Text = "Blue",
                TextColor = Color.Blue
            },
        }
        
    };
}

What's New in this Release

Roadmap

F100s

CollectionView

  • "[Android] Fix NRE when setting the VisualState on the default cell" (#9708)
  • Github #8715 - "NullReferenceException Xamarin.Forms.Platform.iOS.StructuredItemsViewRenderer [Bug] " (#9675)
  • Github #9020 - "[Bug] CarouselView Android Can't Scroll Back when Last Item is Reached" (#9700)
  • Github #9583 - "[Bug] iOS CarouselView size not changed if device orientation changed" (#9654)
  • Github #9666 - "[Bug][iOS] IndicatorView not visible when ItemSource of Carousel is set delayed (INotifyPropertyChanged)" (#9672)

Maps

Visual

Other Enhancements

  • "Add UWP display prompt" (#8720)
  • "Apply fading effect on DetailPage for MasterDetailPage on iOS" (#7437)
  • Github #4459 - "[UWP] BoxView CornerRadius doesn't work" (#7986)
  • Github #6932 - "[Enhancement] EmptyView for BindableLayout" (#7686)
  • Github #9372 - "[Enhancement] [WPF] ActivityIndicatorRenderer to use circular animation" (#9389)

Features in Preview

Current experimental flags

Are you on the cutting edge? Try out ALL of our experimental features now using these flags! Read more about experimental flags.

  • Shell_UWP_Experimental
  • IndicatorView_Experimental
  • SwipeView_Experimental
  • CarouselView_Experimental
  • MediaElement_Experimental
  • StateTriggers_Experimental
  • Markup_Experimental

You may enable these per-platform by adding (for example) Forms.SetFlags("Markup_Experimental") just before calling Forms.Init, or alternatively in your Application constructor by adding Device.SetFlags(new string[]{ "Markup_Experimental" }); just before InitializeComponent(); (if the app uses XAML).

CarouselView

Try it with Forms.SetFlags("CarouselView_Experimental");
  • "[Android] Fix NRE when setting the VisualState on the default cell" (#9708)
  • Github #9020 - "[Bug] CarouselView Android Can't Scroll Back when Last Item is Reached" (#9700)
  • Github #9583 - "[Bug] iOS CarouselView size not changed if device orientation changed" (#9654)
  • Github #9666 - "[Bug][iOS] IndicatorView not visible when ItemSource of Carousel is set delayed (INotifyPropertyChanged)" (#9672)

C# Markup

Try it with Forms.SetFlags("Markup_Experimental");
  • "[Spec] CSharpForMarkup" (#8342)

MediaElement

Try it with Forms.SetFlags("MediaElement_Experimental");
  • "[Tizen] MediaElement control support" (#9634)
  • Github #9742 - "[Bug] MediaElement crashes on iOS when given a URL and device has no network" (#9746)

Release History

  • Wednesday, March 4, 2020 - Xamarin.Forms 4.6.0.379-pre1 (4.6.0 Pre Release 1)

Wednesday, March 4, 2020 - Xamarin.Forms 4.6.0.379-pre1 (4.6.0 Pre Release 1)

Issues Fixed

  • Github #1658 - "[macOS] GestureRecognizer on ListView Item not working" (#7781)
  • Github #2674 - "Exception occurs when giving null values in picker itemsource collection" (#9478)
  • Github #3947 - "[Error] ListView's Header and Footer is not working in WPF" (#8443)
  • Github #8038 - "[Bug] [WPF]ImageButton with source from resource throw System.InvalidOperationException" (#9154)
  • Github #8161 - " [Bug] On WPF ToolbarItem.IsEnabled = false does nothing" (#8612)
  • Github #8521 - "[Bug] CarouselView IsVisible=false than set to true not work on iOS" (#9654)
  • Github #8715 - "NullReferenceException Xamarin.Forms.Platform.iOS.StructuredItemsViewRenderer [Bug] " (#9675)
  • Github #9020 - "[Bug] CarouselView Android Can't Scroll Back when Last Item is Reached" (#9700)
  • Github #9435 - "[Bug] [iOS] NullReferenceException at ScrollViewRenderer.cs" (#9490)
  • Github #9583 - "[Bug] iOS CarouselView size not changed if device orientation changed" (#9654)
  • Github #9609 - "[Bug] iOS CarouselView contents does not resize" (#9654)
  • Github #9666 - "[Bug][iOS] IndicatorView not visible when ItemSource of Carousel is set delayed (INotifyPropertyChanged)" (#9672)
  • Github #9742 - "[Bug] MediaElement crashes on iOS when given a URL and device has no network" (#9746)

Additional fixes included in this release

  • "[Accessibility] Project property is not following VS theme.: Run unit tests on device" (#9011) (#9353)
  • "[Android] Fix NRE when setting the VisualState on the default cell" (#9708)
  • "[Android] Fix unbalanced performance start/stop call" (#8622)
  • "[Android] Optimize RecalculateSpanPositions method" (#8746)
  • "[Android] Fix color filter usage on API29" (#9180)
  • "[iOS] Expose UISearchBarStyle through platform-specific" (#8811)
  • "[iOS] Fix NRE if the detail renderer wasn't created" (#9496)
  • "[REVERTED] [Android] Fix BottomNavigationItemView issue with MasterDetailPage" (#9187)
  • "[WPF] Font icon support for toolbar items" (#9587)
  • "Add null check to GetIconColor" (#9172)
  • "Fix Android SeachBarRenderer CreateNativeControl issue" (#8946)
  • "revert [Android] Fix BottomNavigationItemView issue with MasterDetailPage" (#9709)
  • Github #3770 - "[WPF] ListView.Header not being rendered" (#8443)

Known Issues

  • Github #9636 - "[Bug][Android] Material Visual Renderer Editor/Entry incompatibility with new release candidate of Xamarin.Google.Android.Material"
  • Github #9624 - "[Bug] MediaElement playback controls paper cut"
  • Github #9621 - "[Bug] MediaElement custom position bar is inelegant (paper cut)"

Breaking Changes

Namespace Xamarin.Forms.Platform.iOS

Type Changed: Xamarin.Forms.Platform.iOS.ItemsViewController`1

Removed method:

public override void WillAnimateRotation (UIKit.UIInterfaceOrientation toInterfaceOrientation, double duration);

Namespace Xamarin.Forms.Platform.Tizen

Type Changed: Xamarin.Forms.Platform.Tizen.MediaElementRenderer

Modified base type:

-Xamarin.Forms.Platform.Tizen.ViewRenderer`2[Xamarin.Forms.MediaElement,Tizen.Multimedia.MediaView]
+Xamarin.Forms.Platform.Tizen.ViewRenderer`2[Xamarin.Forms.MediaElement,Xamarin.Forms.Platform.Tizen.Native.LayoutCanvas]

Deprecations

API Changes

See all API Changes here.

Blogs

Xamarin Blogs

Thank you

Thank you to our community for helping to make Xamarin.Forms even better!

This release, we received amazing contributions from these individuals. Give them a big round of applause!

Author Commit PR
Andreas Nesheim (@andreas-nesheim) [Enhancement] Removed internal access modifier from Material (#7879) fixes #6881 #7879
Andrei (@AndreiMisiukevich) Added IconColor property for managing navigation icon color (#5185) #5185
Andrei (@AndreiMisiukevich) fixes #9435 (#9490) fixes #9435 #9490
Artem (@artemious7) fix broken link in PULL_REQUEST_TEMPLATE.md (#9391) #9391
Barry Nolte (@BarryNolte) Implements ListView Header and Footer for WPF (#8443) #8443
Brian Macomber (@bmacombe) Add UWP display prompt (#8720) #8720
Brian Macomber (@bmacombe) Fix 4459 - Update UWP BoxViewRenderer to fully support corner radius (#7986) #7986
Clifford Agius (@CliffAgius) Adds Cookies to the WebView fixing #Issue3262 (#8169) #8169
dottienet (@dottienet) Update VS 2015 -> Visual Studio for Windows (#9643) #9643
Joe Manke (@jcmanke) Map circles (#7401) #7401
Joe Manke (@jcmanke) Expose UISearchBarStyle through platform-specific (#8811) #8811
Kangho Hur (@rookiejava) [Tizen] MediaElement control support (#9634) #9634
Kevin Petit (@kvpt) [Android] Optimize RecalculateSpanPositions method (#8746) #8746
Kevin Petit (@kvpt) Fix unbalanced performance start/stop call. (#8622) #8622
Kevin Petit (@kvpt) [Android] Fix BottomNavigationItemView issue with MasterDetailPage (#9187) #9187
Mahmoud Ali (@akamud) Apply fading effect on DetailPage for MasterDetailPage on iOS (#7437) #7437
melimion (@melimion) FormsFontIcon added (#9587) #9587
melimion (@melimion) [WPF] Fix ToolbarItem.IsEnabled = false does nothing (#8612) #8612
melimion (@melimion) [macOS] Fix GestureRecognizer on ListView Item not working (#7781) fixes #1658 #7781
Peter Foot (@peterfoot) [Android,iOS,UWP,WPF] MediaElement control (#3482) #3482
Peter Foot (@peterfoot) Replacement ActivityIndicator for WPF (#9389) fixes #9372 #9389
sahi82 (@sahi82) Adding null check for picker items (#9478) fixes #2674 #9478
thisisthekap (@thisisthekap) Fixed broken link in CONTRIBUTING.md (#9518) #9518
TingtingAn (@TingtingAn) Fix SeachBarRenderer CreateNativeControl issue (#8946) #8946
Vincent Hoogendoorn (@VincentH-Net) [Spec] CSharpForMarkup (#8342) #8342
Yuriy Holembyovskyy (@yurkinh) Added context switching befor UpdateAspect() method call (#9154) fixes #8038 #9154

Feedback welcome

Your feedback is important to us. If there are any problems with this release, check the Xamarin.Forms Forums and GitHub for existing issues. Report new issues and suggestions on GitHub.

Open Source

Xamarin.Forms 4.6.0 is based on the open-source Xamarin.Forms repository: