Xamarin.Forms 4.6.0.726 (4.6.0) 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.

App Theme Support (Dark and Light Modes, etc.)

We are now previewing support for different OS level theme modes such as dark and light. To get started, opt-in to the feature using the flag Forms.SetFlags("AppTheme_Experimental");.

For best results at this time, disable XAMLC in your AssemblyInfo.cs and elsewhere.

On styles as well as inline with controls you can use the new OnAppTheme API and markup extension to express different values per mode, and your app will update automatically when the OS preference changes.

Use AppThemeColor:

Define the color in your resources:

<AppThemeColor x:Key="MyColor" Light="HotPink" Dark="Yellow" />

Apply the color to any control:

<Label TextColor="{DynamicResource MyColor}">This text is HotPink or Yellow depending on Light (or default) or Dark (through DynamicResource)</Label>

Using styles:

Define the style in your resources:

<Style x:Key="OSThemeStyle" TargetType="Label" >
    <Setter Property="TextColor" Value="{OnAppTheme Black, Light=Green, Dark=Red}" />
</Style>

Apply the style to the target control(s):

<Label Style="{DynamicResource Key=OSThemeStyle}">This text is green or red depending on Light (or default) or Dark (through style)</Label>

Inline:

<Label TextColor="{OnAppTheme Light=Green, Dark=Red}">This text is green or red depending on Light (or default) or Dark</Label>
<Label>
	<Label.TextColor>
	    <OnAppTheme x:DataType="Color" Light="Green" Dark="Red" />
	</Label.TextColor>
</Label>

From StyleSheet with CSS:

<StyleSheet>
    <StyleSheetExtension.Style>
	<OnAppTheme x:TypeArguments="x:String">
	    <OnAppTheme.Light>
		<![CDATA[
		    #cssStyledLabel {
			color: purple;
		    }
		]]>
	    </OnAppTheme.Light>
	    <OnAppTheme.Dark>
		<![CDATA[
		    #cssStyledLabel {
			color: orange;
		    }
		]]>
	    </OnAppTheme.Dark>
	</OnAppTheme>
    </StyleSheetExtension.Style>
</StyleSheet>

For more examples, check the AppThemeGalleries.

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

  • "[Enhancement] Expander control" (#9044) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • "[Spec] CSharpForMarkup" (#8342)
  • "[Tizen] Adds RadioButton" (#10237) (added in 4.6.0.726 (4.6.0))
  • "Cross-Platform OS Theme APIs" (#9958) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • Github #2404 - "[F100] RadioButton" (#5349) (#8910)
  • Github #4509 - "[Shell] No styling properties for ShellItem or MenuItem " (#9886) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))

F100s

Shell

  • "[iOS] Shell fix clear of ShellSection " (#10253) (added in 4.6.0.726 (4.6.0))
  • "[Shell] Implement FlyoutBackgroundColor for UWP" (#9915) (added in 4.6.0.494-pre2 (4.6.0 Pre Release 2))
  • "[Tizen] Add Shell renderers for watch" (#10363) (added in 4.6.0.726 (4.6.0))
  • "Cherrypick #10396 (embedded fonts iOS fix) to 4.6" (#10399) (added in 4.6.0.726 (4.6.0))
  • "Fix route removal to keep one default route if it's needed" (#10156) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • Github #10108 - "[Bug] Shell cancel navigation doesn't work for top bar navigation on android" (#10189) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • Github #10238 - "NullReferenceException in Shell" (#10252) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • Github #10382 - "[Bug] Styling issues with FlyoutItem classes" (#10381) (#10383) (added in 4.6.0.726 (4.6.0))
  • Github #4509 - "[Shell] No styling properties for ShellItem or MenuItem " (#9886) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • Github #6161 - "[Bug] Changing the Shell Flyout Header after it's already rendered doesn't work" (#10079) (added in 4.6.0.726 (4.6.0))
  • Github #6227 - "[Bug] Xamarin.Forms Shell Opener Issue for "RTL Language" when Tap at Hamburger" (#9237) (added in 4.6.0.726 (4.6.0))
  • Github #7160 - "Shell Bottom Navigation Bar Rendering Issue" (#10063) (added in 4.6.0.529-pre3 (4.6.0 Pre Release 3))
  • Github #7878 - "[Bug] Page not popped on iOS 13 FormSheet swipe down" (#7923) (#8551) (added in 4.6.0.529-pre3 (4.6.0 Pre Release 3))
  • Github #8581 - "[Bug] Shell application flickering on back navigation" (#10158) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • Github #9169 - "[Bug] Shell Navigated event/override is a mess" (#10048) (added in 4.6.0.529-pre3 (4.6.0 Pre Release 3))
  • Github #9440 - "[Bug] Flyout remains open on FlyoutItem double click " (#9719) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • Github #9975 - "[Bug] Shell Can't change query property values when on the same page using GoToAsync" (#10176) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))

Visual

  • "[Tizen] Add material renderers for Editor and Picker" (#9384) (added in 4.6.0.726 (4.6.0))
  • "iOS Material Components Bump" (#9053) (added in 4.6.0.529-pre3 (4.6.0 Pre Release 3))
  • 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))

CollectionView

  • "[Tizen] Changed CarouselView scroll logic according to the Core change." (#10235) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • "[Tizen] Enhances ListView on Tizen " (#10236) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • "[UWP] Make sure to call UpdateInitialPosition on CarouselView" (#10041) (added in 4.6.0.494-pre2 (4.6.0 Pre Release 2))
  • Github #10019 - "[Bug, UWP] IndicatorCodeGallery - I can't get to the last item." (#10068) (added in 4.6.0.494-pre2 (4.6.0 Pre Release 2))
  • Github #10234 - "[Bug] CarouselView disposed on iOS when navigating back in Shell" (#10242) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • Github #5455 - "ItemSizingStrategy MeasureAllItems does not work for iOS" (#10241) (added in 4.6.0.726 (4.6.0))
  • Github #7683 - "[Bug] [iOS] Dark Mode not supported on certain controls" (#9840) (added in 4.6.0.529-pre3 (4.6.0 Pre Release 3))
  • 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 #8766 - "[Bug] CollectionView.EmptyView does not inherit parent Visual" (#10022) (added in 4.6.0.529-pre3 (4.6.0 Pre Release 3))
  • Github #8964 - "CarouselView - Adding an item to the beginning of the bound ItemSource causes the carousel to skip sometimes [Bug] " (#10103) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • Github #9232 - "[Bug] Disabled RefreshView disables scrolling" (#10013) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • Github #9322 - "[Bug] CarouselView's Position doesn't get updated to reflect ObservableCollection.Remove" (#9854) (added in 4.6.0.494-pre2 (4.6.0 Pre Release 2))
  • Github #9431 - "[Bug] ObjectDisposedException (BoxView inside CollectionView)" (#9764) (added in 4.6.0.494-pre2 (4.6.0 Pre Release 2))
  • Github #9580 - "[Bug] CollectionView - iOS - Crash when adding first item to empty item group " (#9911) (added in 4.6.0.726 (4.6.0))
  • Github #9826 - "[Bug] Indicator shows # of indicators = MaximumVisible even when there are fewer items" (#10401) (added in 4.6.0.726 (4.6.0))

Maps

  • "Map circles" (#7401)
  • Github #10146 - "Xamarin.Forms.Maps.Map.VisibleRegion is null untill it's panned" (#10239) (added in 4.6.0.726 (4.6.0))

Other Enhancements

  • "[Tizen] Provides global Circle Surface for wearable" (#10083) (added in 4.6.0.529-pre3 (4.6.0 Pre Release 3))
  • "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
  • AppTheme_Experimental
  • CarouselView_Experimental
  • MediaElement_Experimental
  • StateTriggers_Experimental
  • Markup_Experimental
  • Expander_Experimental

Dark Mode/App Themes

Try it with Forms.SetFlags("AppTheme_Experimental");
  • "[AND] Default style to DayNight (Dark Theme support)" (#9869) (added in 4.6.0.529-pre3 (4.6.0 Pre Release 3))
  • "[UWP] Fix TextBox styling to adopt Dark Theme" (#10150) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • "Add GetNamedColor for platform specific colors" (#10008) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • "AppTheme fix NRE" (#10327) (added in 4.6.0.726 (4.6.0))
  • "Cross-Platform OS Theme APIs" (#9958) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • "Fix coloring of UWP Entry buttons" (#10328) (added in 4.6.0.726 (4.6.0))
  • "Fix iOS <13 support " (#10185) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • "Rename AppTheme enum to OSAppTheme" (#10302) (added in 4.6.0.726 (4.6.0))
  • Github #10245 - "[Bug] ViewRenderer.TraitCollectionDidChange NullReferenceException, Regression in v4.6.0.529-pre3" (#10246) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • Github #7683 - "[Bug] [iOS] Dark Mode not supported on certain controls" (#9840) (added in 4.6.0.529-pre3 (4.6.0 Pre Release 3))

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 #10095 - "[Bug][iOS] SwipeView.Open() doesn't work on first call in 4.6-pre2" (#10099) (added in 4.6.0.529-pre3 (4.6.0 Pre Release 3))
  • Github #10113 - "[Bug] IconImageSource in a SwipeItem is rendered incorrectly" (#10130) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • Github #9326 - "[Bug] RefreshView should delay effects of IsEnabled while a refresh is happening and iOS is handling IsEnabled false incorrectly" (#10015) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • Github #9413 - "[Enhancement] Add a way to open SwipeView programatically" (#9635) (added in 4.6.0.494-pre2 (4.6.0 Pre Release 2))
  • Github #9881 - "[Enhancement] Add IsVisible to SwipeItem" (#9949) (added in 4.6.0.726 (4.6.0))

Expander

Try it with Forms.SetFlags("Expander_Experimental");
  • "[Enhancement] Expander control" (#9044) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • Github #10230 - "[Bug] Expander + CollectionView: padding and margin issues" (#10283) (added in 4.6.0.726 (4.6.0))

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))
  • Github #10382 - "[Bug] Styling issues with FlyoutItem classes" (#10381) (#10383) (added in 4.6.0.726 (4.6.0))
  • Github #4509 - "[Shell] No styling properties for ShellItem or MenuItem " (#9886) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • Github #7878 - "[Bug] Page not popped on iOS 13 FormSheet swipe down" (#7923) (#8551) (added in 4.6.0.529-pre3 (4.6.0 Pre Release 3))

C# Markup

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

CarouselView

Try it with Forms.SetFlags("CarouselView_Experimental");
  • "[Tizen] Changed CarouselView scroll logic according to the Core change." (#10235) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • "[UWP] Make sure to call UpdateInitialPosition on CarouselView" (#10041) (added in 4.6.0.494-pre2 (4.6.0 Pre Release 2))
  • Github #10019 - "[Bug, UWP] IndicatorCodeGallery - I can't get to the last item." (#10068) (added in 4.6.0.494-pre2 (4.6.0 Pre Release 2))
  • Github #10234 - "[Bug] CarouselView disposed on iOS when navigating back in Shell" (#10242) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • Github #8964 - "CarouselView - Adding an item to the beginning of the bound ItemSource causes the carousel to skip sometimes [Bug] " (#10103) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • Github #9322 - "[Bug] CarouselView's Position doesn't get updated to reflect ObservableCollection.Remove" (#9854) (added in 4.6.0.494-pre2 (4.6.0 Pre Release 2))
  • Github #9826 - "[Bug] Indicator shows # of indicators = MaximumVisible even when there are fewer items" (#10401) (added in 4.6.0.726 (4.6.0))

State Triggers

Try it with Forms.SetFlags("StateTriggers_Experimental");
  • "Change StateTriggerBase OnAttached and OnDetached methods to be public" (#9888) (added in 4.6.0.726 (4.6.0))

Release History

  • Wednesday, April 29, 2020 - Xamarin.Forms 4.6.0.726 (4.6.0)
  • Thursday, April 9, 2020 - Xamarin.Forms 4.6.0.616-pre4 (4.6.0 Pre Release 4)
  • Wednesday, April 1, 2020 - Xamarin.Forms 4.6.0.529-pre3 (4.6.0 Pre Release 3)
  • 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, April 29, 2020 - Xamarin.Forms 4.6.0.726 (4.6.0)

Issues Fixed

  • Github #10040 - "[Bug] Button IsEnabled color Android" (#10459)
  • Github #10146 - "Xamarin.Forms.Maps.Map.VisibleRegion is null untill it's panned" (#10239)
  • Github #10230 - "[Bug] Expander + CollectionView: padding and margin issues" (#10283)
  • Github #10382 - "[Bug] Styling issues with FlyoutItem classes" (#10381) (#10383)
  • Github #5455 - "ItemSizingStrategy MeasureAllItems does not work for iOS" (#10241)
  • Github #5682 - "WPF: ViewCell content width does not update on ListView width change" (#8440)
  • Github #6161 - "[Bug] Changing the Shell Flyout Header after it's already rendered doesn't work" (#10079)
  • Github #6227 - "[Bug] Xamarin.Forms Shell Opener Issue for "RTL Language" when Tap at Hamburger" (#9237)
  • Github #6342 - "[Bug] Shell FlowDirection follows Device FlowDirection in all cases." (#9237)
  • Github #6436 - "[Bug] [WPF] Grid + ListView -> first row height not correct" (#8440)
  • Github #6842 - "[Bug] [WPF] ViewCell in scrollable list view does not update width when restoring from maximized window" (#8440)
  • Github #6851 - "[Bug] [CollectionView] [Xamarin.forms] item will be centered when there is only one item" (#10241)
  • Github #8039 - "[Bug] WPF ListView ArgumentOutOfRangeException when tapped" (#8440)
  • Github #8291 - "Android Editor - Text selection menu does not appear when selecting text on an editor placed within a ScrollView" (#10407)
  • Github #9029 - "[Bug] WPF: ViewCell content width does incorrect update" (#8440)
  • Github #9112 - "[Bug] ImageButton - bad tap animation on iOS after upgrading to 4.4.0.991265" (#10394)
  • Github #9580 - "[Bug] CollectionView - iOS - Crash when adding first item to empty item group " (#9911)
  • Github #9686 - "[Bug, CollectionView,iOS] Foundation.Monotouch Exception in Grouped CollectionView " (#9911)
  • Github #9824 - "[Bug] Android Shell FIRST ToobarItem grey-out when the Second ToobarItem CanExecute = False." (#10404)
  • Github #9826 - "[Bug] Indicator shows # of indicators = MaximumVisible even when there are fewer items" (#10401)

Additional fixes included in this release

  • "[iOS] Shell fix clear of ShellSection " (#10253)
  • "[Tizen] Add material renderers for Editor and Picker" (#9384)
  • "[Tizen] Add Shell renderers for watch" (#10363)
  • "[Tizen] Adds OverlayContent to Application" (#10310)
  • "[Tizen] Applying new style on SwitchCell" (#10347)
  • "[Tizen] Fix dependency service registration correctly" (#10287)
  • "[Tizen] Fix exception updating empty OverlayContent" (#10357)
  • "[UITests] Better handling of scroll tests" (#10434)
  • "AppTheme fix NRE" (#10327)
  • "Change StateTriggerBase OnAttached and OnDetached methods to be public" (#9888)
  • "Cherrypick #10396 (embedded fonts iOS fix) to 4.6" (#10399)
  • "Fix coloring of UWP Entry buttons" (#10328)
  • "Fix previewer flakiness on Android" (#10384)
  • "RadioButton Experimental Flag" (#10370)
  • "Rename AppTheme enum to OSAppTheme" (#10302)

Thursday, April 9, 2020 - Xamarin.Forms 4.6.0.616-pre4 (4.6.0 Pre Release 4)

Issues Fixed

  • Github #10108 - "[Bug] Shell cancel navigation doesn't work for top bar navigation on android" (#10189)
  • Github #10113 - "[Bug] IconImageSource in a SwipeItem is rendered incorrectly" (#10130)
  • Github #10133 - "[Bug] [Shell] Locked Flyout disappears when same item pressed twice" (#9719)
  • Github #10208 - "[Bug] Display issue when mixing Style and FontFamily for embedded fonts on iOS." (#10227)
  • Github #10226 - "[Bug] Embedded Fonts Not working correctly on iOS" (#10227)
  • Github #10229 - "[Bug] Expander + CollectionView: Expander content keeps reopening" (#10247)
  • Github #10234 - "[Bug] CarouselView disposed on iOS when navigating back in Shell" (#10242)
  • Github #10245 - "[Bug] ViewRenderer.TraitCollectionDidChange NullReferenceException, Regression in v4.6.0.529-pre3" (#10246)
  • Github #6294 - "[Bug] Xaminals flickers weirdly on some devices" (#10158)
  • Github #7757 - "[Bug] ImageButtonRenderer fails with cross thread access" (#10184)
  • Github #8581 - "[Bug] Shell application flickering on back navigation" (#10158)
  • Github #8689 - "[Bug] Margin of Contentview like Grid, or Stacklayout doesnt work inside RefreshView " (#10010)
  • Github #8940 - "RefreshView color not being honoured first time loading/programatically" (#10011)
  • Github #8964 - "CarouselView - Adding an item to the beginning of the bound ItemSource causes the carousel to skip sometimes [Bug] " (#10103)
  • Github #9232 - "[Bug] Disabled RefreshView disables scrolling" (#10013)
  • Github #9326 - "[Bug] RefreshView should delay effects of IsEnabled while a refresh is happening and iOS is handling IsEnabled false incorrectly" (#10015)
  • Github #9440 - "[Bug] Flyout remains open on FlyoutItem double click " (#9719)
  • Github #9948 - "[Bug] RadioButton.ButtonSource is only implemented on Android" (#9967)
  • Github #9951 - "[Bug] Android 10 Setting ThumbColor on Switch causes a square block" (#10155)
  • Github #9975 - "[Bug] Shell Can't change query property values when on the same page using GoToAsync" (#10176)

Additional fixes included in this release

  • "[Tizen] Changed CarouselView scroll logic according to the Core change." (#10235)
  • "[Tizen] Enable ListView.Scrolled event" (#10128)
  • "[Tizen] Enable Page.ToolbarItem on Watch" (#10145)
  • "[Tizen] Enhances ListView on Tizen " (#10236)
  • "[UWP] Fix FontIcon issue using a empty font name" (#9956)
  • "[UWP] Fix TextBox styling to adopt Dark Theme" (#10150)
  • "Add GetNamedColor for platform specific colors" (#10008)
  • "Cross-Platform OS Theme APIs" (#9958)
  • "Fix iOS <13 support " (#10185)
  • "Fix navigation to expander test" (#10207)
  • "Fix route removal to keep one default route if it's needed" (#10156)
  • Github #10238 - "NullReferenceException in Shell" (#10252)

Wednesday, April 1, 2020 - Xamarin.Forms 4.6.0.529-pre3 (4.6.0 Pre Release 3)

Issues Fixed

Additional fixes included in this release

  • "[AND] Default style to DayNight (Dark Theme support)" (#9869)
  • "iOS Material Components Bump" (#9053)
  • "Update ColorTypeConverter to support HSVA" (#10065)

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

Issues Fixed

  • Github #10019 - "[Bug, UWP] IndicatorCodeGallery - I can't get to the last item." (#10068)
  • 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 #7878 - "[Bug] Page not popped on iOS 13 FormSheet swipe down" (#7923) (#8551)
  • Github #7924 - "[Bug] Setting CarouselView.CurrentItem to an item doesn't display that item" (#9854)
  • 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 #9307 - "[Bug] OnAppearing does not fire after a UIModalPresentationStyle.FormSheet Page is Dismissed" (#7923) (#8551)
  • Github #9322 - "[Bug] CarouselView's Position doesn't get updated to reflect ObservableCollection.Remove" (#9854)
  • Github #9340 - "[Bug] FlexLayout.OnMeasure (System.Double widthConstraint, System.Double heightConstraint) System.NullReferenceException" (#9891)
  • Github #9401 - "[Bug] CarouselView don't respect ItemSpacing and/or PeekAreaInsets for new items" (#9854)
  • Github #9412 - "[Bug] Unhandled Environment exception. - System.ObjectDisposedException: Cannot access a disposed object." (#9764)
  • Github #9431 - "[Bug] ObjectDisposedException (BoxView inside CollectionView)" (#9764)
  • Github #9432 - "[Bug] When selected item is removed from CarouselView ItemsSource, CurrentItem is not changed" (#9854)
  • Github #9771 - "[Bug] [UWP] Changing CarouselView Position does not change view" (#9854)
  • 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)
  • "[UWP] Make sure to call UpdateInitialPosition on CarouselView" (#10041)
  • "[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 #10397 - "[Bug] No intellisense for Expander and occasional red squiggles"
  • Github #10395 - "[Bug] Unable to support AppTheme and user preference at same time"
  • Github #10391 - "[Bug] iOS doesn't update AppThemeColor when appearing is toggled"
  • Github #10318 - "[Bug] [Android] Pre-release version of Xamarin Forms forgets cookies"
  • 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))

Namespace Xamarin.Forms.Platform

Type Changed: Xamarin.Forms.Platform.Resource

Type Changed: Xamarin.Forms.Platform.Resource.Style

Removed field:

public static int NestedScrollBarStyle;

Namespace Xamarin.Forms.Platform.Android

Type Changed: Xamarin.Forms.Platform.Android.IShellBottomNavViewAppearanceTracker

Removed method:

public virtual void SetAppearance (Google.Android.Material.BottomNavigation.BottomNavigationView bottomView, Xamarin.Forms.ShellAppearance appearance);

Type Changed: Xamarin.Forms.Platform.Android.IndicatorViewRenderer

Removed field:

protected Xamarin.Forms.IndicatorView IndicatorsView;

Type Changed: Xamarin.Forms.Platform.Android.Resource

Type Changed: Xamarin.Forms.Platform.Android.Resource.Style

Removed field:

public static int NestedScrollBarStyle;

Type Changed: Xamarin.Forms.Platform.Android.ShellBottomNavViewAppearanceTracker

Removed method:

public virtual void SetAppearance (Google.Android.Material.BottomNavigation.BottomNavigationView bottomView, Xamarin.Forms.ShellAppearance appearance);

Namespace Xamarin.Forms.Platform.Tizen

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

Modified base type:

-Xamarin.Forms.Platform.Tizen.ViewRenderer`2[Xamarin.Forms.DatePicker,Xamarin.Forms.Platform.Tizen.Native.EditfieldEntry]
+Xamarin.Forms.Platform.Tizen.ViewRenderer`2[Xamarin.Forms.DatePicker,ElmSharp.Entry]

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

Modified base type:

-Xamarin.Forms.Platform.Tizen.ViewRenderer`2[Xamarin.Forms.Editor,Xamarin.Forms.Platform.Tizen.Native.Entry]
+Xamarin.Forms.Platform.Tizen.ViewRenderer`2[Xamarin.Forms.Editor,ElmSharp.Entry]

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

Modified base type:

-Xamarin.Forms.Platform.Tizen.ViewRenderer`2[Xamarin.Forms.Picker,Xamarin.Forms.Platform.Tizen.Native.EditfieldEntry]
+Xamarin.Forms.Platform.Tizen.ViewRenderer`2[Xamarin.Forms.Picker,ElmSharp.Entry]

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

Modified base type:

-Xamarin.Forms.Platform.Tizen.ViewRenderer`2[Xamarin.Forms.TimePicker,Xamarin.Forms.Platform.Tizen.Native.EditfieldEntry]
+Xamarin.Forms.Platform.Tizen.ViewRenderer`2[Xamarin.Forms.TimePicker,ElmSharp.Entry]

Namespace Xamarin.Forms.Platform.Tizen.Native

Type Changed: Xamarin.Forms.Platform.Tizen.Native.EditfieldEntry

Removed events:

public event System.EventHandler LayoutFocused;
public event System.EventHandler LayoutUnfocused;
public event System.EventHandler TextBlockFocused;
public event System.EventHandler TextBlockUnfocused;

Deprecations

API Changes

See all API Changes here.

  • "[Enhancement] Expander control" (#9044) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • "[Spec] CSharpForMarkup" (#8342)
  • "[Tizen] Provides global Circle Surface for wearable" (#10083) (added in 4.6.0.529-pre3 (4.6.0 Pre Release 3))
  • "Cross-Platform OS Theme APIs" (#9958) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))
  • "Map circles" (#7401)
  • "Rename AppTheme enum to OSAppTheme" (#10302) (added in 4.6.0.726 (4.6.0))
  • Github #2404 - "[F100] RadioButton" (#5349) (#8910)
  • Github #3262 - "Feature Request - Cookie-functionality for WebViews" (#8169)
  • Github #4459 - "[UWP] BoxView CornerRadius doesn't work" (#7986)
  • Github #5177 - "[Enhancement] Change NavigationPage back button color on Android" (#5185)
  • Github #6932 - "[Enhancement] EmptyView for BindableLayout" (#7686)
  • Github #9948 - "[Bug] RadioButton.ButtonSource is only implemented on Android" (#9967) (added in 4.6.0.616-pre4 (4.6.0 Pre Release 4))

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
Andrei (@AndreiMisiukevich) [Enhancement] Expander control (#9044) #9044
Andrei (@AndreiMisiukevich) https://github.com/xamarin/Xamarin.Forms/issues/10229 (#10247) #10247
Andrei (@AndreiMisiukevich) Expander + CollectionView issues (#10283) fixes #10230 #10283
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
Daniel Hindrikes (@dhindrik) [Android] Setting ThumbColor on Switch causes a square block (#10155) fixes #9951 #10155
dottienet (@dottienet) Update VS 2015 -> Visual Studio for Windows (#9643) #9643
Jay Cho (@JoonghyunCho) Enable List.Scrolled event (#10128) #10128
Jay Cho (@JoonghyunCho) [Tizen] Applying new style on SwitchCell (#10347) #10347
Jay Cho (@JoonghyunCho) [Tizen] Fix exception updating empty OverlayContent (#10357) #10357
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
Kangho Hur (@rookiejava) Update ColorTypeConverter to support HSVA (#10065) #10065
Kangho Hur (@rookiejava) [Tizen] Provides global Circle Surface for wearable (#10083) #10083
Kangho Hur (@rookiejava) [Tizen] Enable Page.ToolbarItem on Watch (#10145) #10145
Kangho Hur (@rookiejava) [Tizen] Adds RadioButton (#10237) #10237
Kangho Hur (@rookiejava) [Tizen] Fix dependency service registration correctly (#10287) #10287
Kangho Hur (@rookiejava) [Tizen] Adds OverlayContent to Application (#10310) #10310
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
Pedro Jesus (@pictos) [GH-9440] - Fix Flyout remains open on FlyoutItem double click (#9719) #9719
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
shmin (@shyunMin) [Tizen] Enhances ListView on Tizen (#10236) #10236
shmin (@shyunMin) [Tizen] Add material renderers for Editor and Picker (#9384) #9384
shmin (@shyunMin) [Tizen] Add Shell renderer for watch (#10363) #10363
sung-su.kim (@sung-su) [Tizen] Changed CarouselView scroll logic according to the Core change. (#10235) #10235
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
Vladislav Antonyuk (@VladislavAntonyuk) [Bug] [Core+WPF] Grid + ListView -> first row height not correct + width not correct + ArgumentOutOfRangeException when tapped (#8440) fixes #6436 fixes #8039 fixes #9029 fixes #5682 fixes #6842 #8440
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
Yuriy Holembyovskyy (@yurkinh) Add UpdateSize() to OnElementChanged() (#9930) fixes #6408 #9930
Yuriy Holembyovskyy (@yurkinh) Add Dispose method to properly remove Shadow view and avoid memory leak (#10017) fixes #9997 #10017
Yuriy Holembyovskyy (@yurkinh) Fix 9939 [iOS][UWP] Dispose method not called when adding control inside the NavigationPage.TitleView (#10152) #10152
Yuriy Holembyovskyy (@yurkinh) [WPF] ImageButtonRenderer fails with cross thread access (#10184) fixes #7757 #10184

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: