Xamarin.Forms 4.6.0.494-pre2 (4.6.0 Pre Release 2) 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

Shell

  • "[Shell] Implement FlyoutBackgroundColor for UWP" (#9915) (added in 4.6.0.494-pre2 (4.6.0 Pre Release 2))

CollectionView

  • Github #8308 - "[Bug] [iOS] Cannot access a disposed object. Object name: 'GroupableItemsViewController`1" (#9931) (added in 4.6.0.494-pre2 (4.6.0 Pre Release 2))
  • Github #8715 - "NullReferenceException Xamarin.Forms.Platform.iOS.StructuredItemsViewRenderer [Bug] " (#9675)
  • Github #9431 - "[Bug] ObjectDisposedException (BoxView inside CollectionView)" (#9764) (added in 4.6.0.494-pre2 (4.6.0 Pre Release 2))

Maps

Visual

  • Github #2404 - "[F100] RadioButton" (#5349) (#8910)
  • Github #6881 - "[Enhancement] Remove internal access modifier from Material" (#7879)
  • Github #9261 - "[Visual] [Material] Can't set TextColor and BackgroundColor for a disabled Material button" (#9655) (added in 4.6.0.494-pre2 (4.6.0 Pre Release 2))

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

SwipeView

Try it with Forms.SetFlags("SwipeView_Experimental");
  • "[Android] Fix SwipeView icon size using FontImageSource" (#9955) (added in 4.6.0.494-pre2 (4.6.0 Pre Release 2))
  • Github #9413 - "[Enhancement] Add a way to open SwipeView programatically" (#9635) (added in 4.6.0.494-pre2 (4.6.0 Pre Release 2))

UWP Shell

Try it with Forms.SetFlags("Shell_UWP_Experimental");
  • "[Shell] Implement FlyoutBackgroundColor for UWP" (#9915) (added in 4.6.0.494-pre2 (4.6.0 Pre Release 2))

C# Markup

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

Release History

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

Wednesday, March 25, 2020 - Xamarin.Forms 4.6.0.494-pre2 (4.6.0 Pre Release 2)

Issues Fixed

  • Github #5560 - "[Android] Disposed EntryCell throws ObjectDisposed exception after updating an object that the EntryCell was previously bound to" (#9764)
  • Github #6403 - "Xamarin.Forms UWP Picker collapses on opening Dropdown menu [Bug] " (#8165)
  • Github #6587 - "Android Crash - ObjectDisposedException Rendering Shadow with FramerRenderer" (#9764)
  • Github #6698 - "[Bug] InvalidOperationException in TypedBinding`2[TSource,TProperty].Apply" (#9542)
  • Github #7242 - "[Bug] iOS FontSize is calculated incorrectly" (#9821)
  • Github #8183 - "[Bug] CSS Descendants with Base class selector do not match" (#9004)
  • Github #8308 - "[Bug] [iOS] Cannot access a disposed object. Object name: 'GroupableItemsViewController`1" (#9931)
  • Github #8607 - "Cannot access a disposed object. Object name: 'Android.Widget.TextView'." (#9764)
  • Github #9261 - "[Visual] [Material] Can't set TextColor and BackgroundColor for a disabled Material button" (#9655)
  • Github #9340 - "[Bug] FlexLayout.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) System.NullReferenceException" (#9891)
  • Github #9412 - "[Bug] Unhandled Environment exception. - System.ObjectDisposedException: Cannot access a disposed object." (#9764)
  • Github #9431 - "[Bug] ObjectDisposedException (BoxView inside CollectionView)" (#9764)
  • Github #9841 - "[Bug] Crash in NavigationRenderer+ParentingViewController.Dispose (System.Boolean disposing)" (#9877)
  • Github #9842 - "[Bug][iOS] MasterDetailPage shadow platform-specific not applied when first set" (#9853)
  • Github #9845 - "[Bug] System.ObjectDisposedException: Cannot access a disposed object. Object name: 'Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer'. or JniPeerMembers.AssertSelf (Java.Interop.IJavaPeerable self)" (#9764)

Additional fixes included in this release

  • "[Android] Fix SwipeView icon size using FontImageSource" (#9955)
  • "[Shell] Implement FlyoutBackgroundColor for UWP" (#9915)
  • "[XamlC] use XmlReader for detecting XAML and x:Class" (#9922)
  • "Adds Color.FromHsva" (#10054)

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

Issues Fixed

  • 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 #8715 - "NullReferenceException Xamarin.Forms.Platform.iOS.StructuredItemsViewRenderer [Bug] " (#9675)
  • Github #9435 - "[Bug] [iOS] NullReferenceException at ScrollViewRenderer.cs" (#9490)

Additional fixes included in this release

  • "[Accessibility] Project property is not following VS theme.: Run unit tests on device" (#9011) (#9353)
  • "[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 #10048 - "Fix navigating/navigated events and add ".." navigation"
  • Github #9967 - "Remove RadioButton.ButtonSource API"
  • 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

  • Github #4459 - "[UWP] BoxView CornerRadius doesn't work" (#7986)
  • Github #9261 - "[Visual] [Material] Can't set TextColor and BackgroundColor for a disabled Material button" (#9655) (added in 4.6.0.494-pre2 (4.6.0 Pre Release 2))

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
Andrei (@AndreiMisiukevich) fixes #9748 (#9762) #9762
Andrei (@AndreiMisiukevich) fixes #9782 (#9800) #9800
Artem (@artemious7) fix broken link in PULL_REQUEST_TEMPLATE.md (#9391) #9391
Barry Nolte (@BarryNolte) Implements ListView Header and Footer for WPF (#8443) #8443
Bohdan Benetskyi (@bbenetskyy) #8183 Fix Base Class Selector with Descendant Selection (#9004) #9004
Brian Macomber (@bmacombe) Add UWP display prompt (#8720) #8720
Brian Macomber (@bmacombe) Fix 4459 - Update UWP BoxViewRenderer to fully support corner radius (#7986) #7986
Brian Macomber (@bmacombe) [UWP] Prevents Picker collapsing on opening Dropdown menu (#8165) fixes #6403 #8165
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
Jonathan Goldberger (@jgold6) [Android] Visual Material Underline color should match placeholder color (#8530) fixes #6187 #8530
Kangho Hur (@rookiejava) [Core] Adds Color.FromHsva (#10054) #10054
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
Mateus Luiz Camilo (@MathewLC) [Android] Prevent to breaking when spans have paragraph ('\n' character) (#8471) fixes #7534 #8471
Matthias Bruzek (@bruzkovsky) do not throw exeption when target of WeakReference was collected (#9542) fixes #6698 #9542
melimion (@melimion) FormsFontIcon added (#9587) #9587
Omniq-APL-Rollving (@Omniq-Rollving) Fix Issue7242 iOS FontSize is calculated incorrectly (#9821) #9821
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
Yuriy Holembyovskyy (@yurkinh) Add UpdateApplyShadow() in ViewDidLoad() (#9853) fixes #9842 #9853
Yuriy Holembyovskyy (@yurkinh) fixes #9952 On<iOS>().SetHideNavigationBarSeparator(true) does not work on Xamarin.Forms latest stable version (4.5.0.356) (#9972) #9972
Yuriy Holembyovskyy (@yurkinh) Add MaskToBounds property to clip a layer’s contents (#10023) fixes #9265, #9774 #10023

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: