Current Release: Xamarin.Forms 4.3.0

PaulDiPietroPaulDiPietro USXamarin Team Xamurai

We have officially released Xamarin.Forms 4.3.0 stable.

Release Notes

Highlights

  • CollectionView: Vertical, Horizontal, Grid, Custom. No more ViewCell wrapping.
  • CarouselView: based on the same foundation as CollectionView. AND join our challenge to get some swag!
  • HTML content type support for Label
  • Character spacing
  • Label padding
  • Entry clear button mode
  • ListView scrolled event
  • Display prompts (take entry on an alert modal)
  • Source link support
  • Android Support 28.0.0.3
  • Shell support for UWP (Preview)
  • And lots more!

We hope you enjoy taking advantage of all these new features. Should you encounter any issues, please file them on GitHub.

Posts

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭
    Good

    Do you think that CollectionView have to substitute ListView?
  • RhysWaldenRhysWalden USMember

    From the release 4.3 release notes I think the description for the following item needs to be update -

    Github #7156 - "[Bug] UWP SearchBar not visible if you set a WidthRequest property for another platform" (#7188)

    This change affects all places in the app where {OnPlatform} is used, and really as a side effect fixes UWP SearchBar.

    When {OnPlatform} is used in conjunction with the IsVisible property, with the following {OnPlatform Android=True} before for all other platforms the value would be false. Now with this change they will be true. thus on iOS views that should be hidden are now appearing. This now means that we also need to know the default value the bindable property.

    This has a larger impact than is advertised.

  • JohnHardmanJohnHardman GBUniversity mod
    edited November 1

    @PaulDiPietro said:

    • Display prompts (take entry on an alert modal)

    Is DisplayPromptAsync expected to work on UWP in XF 4.3 ?
    Or, put another way, it doesn't seem to work on UWP in XF 4.3 when doing

    string result = await DisplayPromptAsync("Title", "Message", "OK", "Cancel", "0123456789", 20, Keyboard.Telephone);
    
  • Andrei_IAndrei_I ROMember
    edited November 4

    After updating forms packages to 4.3.0.947036 i see a "flickering"(something like a page refresh) every time a page is popped on Android. Seems like the animation is broken. When the page is pushed, the animation is ok.
    I downloaded the shell sample project (Xanimals), updated Xamarin forms package and the behaviour is the same.
    Does anyone else have this issue?

  • JoeMankeJoeManke USMember ✭✭✭✭✭

    @RhysWalden said:
    From the release 4.3 release notes I think the description for the following item needs to be update -

    Github #7156 - "[Bug] UWP SearchBar not visible if you set a WidthRequest property for another platform" (#7188)

    This change affects all places in the app where {OnPlatform} is used, and really as a side effect fixes UWP SearchBar.

    When {OnPlatform} is used in conjunction with the IsVisible property, with the following {OnPlatform Android=True} before for all other platforms the value would be false. Now with this change they will be true. thus on iOS views that should be hidden are now appearing. This now means that we also need to know the default value the bindable property.

    This has a larger impact than is advertised.

    Sounds like something worth filing a GitHub issue about, but you can add Default=False to these OnPlatforms to get back to previous behavior.

  • JoeMankeJoeManke USMember ✭✭✭✭✭
    edited November 5

    @JohnHardman said:
    Is DisplayPromptAsync expected to work on UWP in XF 4.3 ?

    It appears it was only implemented for Android and iOS.
    https://github.com/xamarin/Xamarin.Forms/pull/6714

    Description of Change

    See #6713 for more explanation. This only implements iOS and Android.

  • rshaulrshaul USMember ✭✭
    edited November 22

    Just wanted to say thanks for making Device.OpenUri obsolete for no reason beyond bikeshedding that I can see after looking at the GitHub issue and pushing everyone to install a large dependency that looks annoying to maintain on Android.

    Sorry for being snippy but shouldn't opening URLs be something that Xamarin.Forms itself supports out of the box? IMO and all that.

  • MikilllMikilll Member ✭✭✭

    @rshaul
    This large dependency is super optimized and during linking all APIs which you are not using are getting stripped.

  • rshaulrshaul USMember ✭✭

    @Mikilll
    That's good to know but this is hardly a trivial setup process: make sure the Android app is targeting 9.0, be prepared for specific Xamarin.Android.Support library version requirements. Write several lines of initialization code over multiple different methods. Then every time Xamarin.Essentials is updated maybe they change the Android targeting requirements earlier than the project I'm maintaining is planning on doing it, etc.

    Seems like a lot just to open a URL. I'll probably just write some custom code that handles opening URLs because Essentials seems like shooting a fly with a canon if you just need it for this one task IMO.

  • MikilllMikilll Member ✭✭✭

    @rshaul

    "make sure the Android app is targeting 9.0"
    Is it really a problem in Xamarin development? If you won't be up to date with Android APIs, in the future you won't be able to upgrade your app on Google Play.

    "be prepared for specific Xamarin.Android.Support library version requirements"
    The same as the above. It's a good practice to keep up to date with Android Support Libraries because they are linked with target API.

    "Write several lines of initialization code over multiple different methods"
    Really? Configuration of Xamarin.Essential is very easy and straightforward.

    "Essentials seems like shooting a fly with a canon if you just need it for this one task IMO"
    I think most apps will need at least 3-4 APIs from Xamarin.Essentials. These are such basic and useful functionalities that it is very unlikely that you won't need them in the future in your app.

  • rshaulrshaul USMember ✭✭

    @Mikilll
    Sure everything is simple until it stops working for some reason down the road and you're stuck reading blog posts like this one figuring out what went wrong
    https://redth.codes/how-to-fix-the-dreaded-version-conflict-nuget-error-in-your-xamarin-android-projects/

  • JoeMankeJoeManke USMember ✭✭✭✭✭

    @rshaul Sure, it's annoying that Device.OpenUri in Xamarin.Forms was deprecated in favor of Xamarin.Essentials, but the thing about Xamarin.Forms is they never seem to actually remove deprecated things. If you're okay with having a compile warning (which you can use preprocessor directives to ignore anyways) you can keep using it.

  • rshaulrshaul USMember ✭✭

    @JoeManke Not a bad idea, I've created a wrapper class so I don't have to sprinkle pragmas all over the code

    public static class Opener
    {
        public static void OpenUrl(string url) {
    #pragma warning disable CS0618
            Device.OpenUri(new Uri(url));
    #pragma warning restore CS0618
        }
    }
    
    
  • AnthonyRamirezAnthonyRamirez USUniversity ✭✭✭
    edited November 27

    I agree OpenUrl should be standard functionality in the framework. I can't seem to find why it was made obsolete.

    It's also interesting there is no mention of it being made obsolete in the standard documentation.

    https://docs.microsoft.com/en-us/dotnet/api/xamarin.forms.device.openuri?view=xamarin-forms

    I also just found that TemplateBinding has also been made obsolete :(

    Use Binding.Source=RelativeBindingSource.TemplatedParent

    I couldn't find any mention in the standard documentation or update notes. In my opinion, this is an unexpected and a bit scary as I depend on TemplateBinding for my custom controls.

    Microsoft Doc: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/templates/control-templates/template-binding

  • JoeMankeJoeManke USMember ✭✭✭✭✭
    edited November 27

    @AnthonyRamirez With regards to the API docs, I think it's an issue of them not having been regenerated recently. I was looking at them last week to answer a question and saw that ListItemsLayout and GridItemsLayout are missing their item spacing properties, while they do show up in XAML autcomplete in Visual Studio.

  • AnthonyRamirezAnthonyRamirez USUniversity ✭✭✭

    @JoeManke I hear you...I'm sure you can understand my concern of having lots of existing (and working) code that suddenly became obsolete.

Sign In or Register to comment.