Xamarin.Forms 2.3.4.270

124

Posts

  • JoeMankeJoeManke USMember ✭✭✭
    edited May 16

    There's also the extremely simple solution to that bug - don't update your Android support libraries. Xamarin.Forms went through dozens of versions before they decided to make those minimum dependencies instead of hard dependencies, it's not like they're really breaking something that was possible to do previously.

  • nikki00nikki00 ATMember

    i am currently drawing routes on the GoogleMap; however, I can't figure out how to get a reference to the NativeMap at the right time.

  • JoeMankeJoeManke USMember ✭✭✭

    @nikki00 There's not a great place for it in 2.3.4. If you move to a 2.3.5 pre-release, override the method OnMapReady(GoogleMap map) in your MapRenderer.

  • GrahamPettGrahamPett GBUniversity ✭✭

    After upgrading to 2.3.4.247, I'm getting this error when building (any platform):

    The "DebugType" parameter is not supported by the "XamlCTask" task. Verify the parameter exists on the task, and it is a settable public instance property.

    I'm running Xamarin VS 4.4.0.34 due to the bugs in the latest "stable" version making it unusable.

  • renzskarenzska USMember ✭✭
    edited May 17

    I am getting the same error as GrahamPett with 2.3.4.247:

    /packages/Xamarin.Forms.2.3.4.247/build/portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20/Xamarin.Forms.targets(4,4): Error MSB4064: The "DebugType" parameter is not supported by the "XamlCTask" task. Verify the parameter exists on the task, and it is a settable public instance property. (MSB4064)

    As well as:

    /packages/Xamarin.Forms.2.3.4.247/build/portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20/Xamarin.Forms.targets(3,3): Error MSB4063: The "XamlCTask" task could not be initialized with its input parameters. (MSB4063)

  • JKayJKay USMember ✭✭✭
    edited May 18

    Also getting:

    MSB4064 The "DebugType" parameter is not supported by the "XamlCTask" task. Verify the parameter exists on the task, and it is a settable public instance property.

    with 2.3.4.247, Cant build Android, UWP works, Havent tried ios

    Looks like probably not the only ones https://forums.xamarin.com/discussion/95724/xamarin-forms-2-3-4-247-update-project-wont-build

  • renzskarenzska USMember ✭✭

    Looks like they've patched it (hoping it's the same thing). Just have to wait for it to be released: https://github.com/xamarin/Xamarin.Forms/commit/f01cf880403f649cf6d6ccc71d930eae646bc698

  • JKayJKay USMember ✭✭✭

    @renzska Thanks for the update. Hopefully they release that patch as another point release.

  • JKayJKay USMember ✭✭✭
    edited May 24

    DataTriggers do not work on UWP when using Release builds.

    I have uploaded a sample application here

    Steps to reproduce:
    1. open app on UWP run in Debug and see trigger works fine
    2. open app on UWP run in release see trigger doesnt work.

    I don't know if this has always been a problem or just in this release.

    Obviously windows store submissions need to be built against RELEASE so I would imagine this would ruin quite a few apps chances on UWP.

    Could someone take a look?

  • JKayJKay USMember ✭✭✭
    edited May 25

    Found an answer from someone on the forums here: https://forums.xamarin.com/discussion/comment/276276#Comment_276276

    The answer is to add a new assembly to the Xamarin otherassemblies.

                Xamarin.Forms.Forms.Init(e, new[] { typeof(Xamarin.Forms.Xaml.Extensions).GetTypeInfo().Assembly });
    

    Please Xamarin put this in your documentation for UWP! This is your own library!

  • Pavel.IvanovPavel.Ivanov USMember

    @batmaci said:
    Hello, please provide a fix for this bug.
    This is really no go and it has been already 2 months for such a critical bug. People needs to be able remove pages from the stack without using pop page.

    Hi Xamarin guys!
    How about this issue: PopAsync crashing after RemovePage when support packages are updated to 25.1.1? I cannot integrate Firebase components and release my app because of this bug! When do you plan to fix it?

    Thanks!

  • AnthonySarrisAnthonySarris AUMember ✭✭

    Call
    UIApplication.SharedApplication.KeyWindow.RootViewController.PresentModalViewController(imagePicker, true);
    Does not work any more ?

  • AnthonySarrisAnthonySarris AUMember ✭✭

    Hi,
    Here is the sample project to reproduce the issue.
    https://github.com/arunpurang/Xamarin

    In the TestGallaryPage.cs uncomment line #9 and it does not work.
    and comment out line #9 and it works.
    It has wasted lot of my time.
    Please try to fix it as soon as possible as I am on tight deadline.
    -A

  • MassimoLaSpinaMassimoLaSpina USMember ✭✭

    Here https://bugzilla.xamarin.com/show_bug.cgi?id=56240#c52 you can find a workaround for the performance issue

  • PhilippSumiPhilippSumi USMember ✭✭✭
    edited May 29

    @MassimoLaSpina said:
    Here https://bugzilla.xamarin.com/show_bug.cgi?id=56240#c52 you can find a workaround for the performance issue

    I really hope a fix for that will be rolled out soon. My current situation for the last 3 weeks:

    • Had to unload Android completely because of the bug with locked DLLs.
    • During that time I was only doing iOS development, where my debugger doesn't hit any break points. That's a fun exercise. Not.
    • Now fixed the locked DLLS bug with a VS extension hack, but can't really do any development, because the performance bug makes it impossible to get any development done without wanting to kill myself. And the workaround with shuffling around VS binaries doesn't really look too attractive either.

    Xamarin: Any ETA on the next VS update?

  • MassimoLaSpinaMassimoLaSpina USMember ✭✭
    edited May 30

    @PhilippSumi you can either

    • install VS 2015 and Xamarin 4.5.0.475
    • overwrite the libraries in your copy of VS2017 with the ones you find in Xamarin 4.5.0.475 (as explained in the first part of this comment https://bugzilla.xamarin.com/show_bug.cgi?id=56240#c52 , since there isn't yet a way to fix VS automatically)
    • install Xamarin Studio 6.2 and Xamarin 4.5.0.475 (I tested it and it works perfectly, in the beginning it was a bit tricky to setup because of all the dependencies required (BuildTools2013, BuildTools2015, gtk-sharp-2.12.30) but after installing all this stuff everything is running smoothly; moreover, in Xamarin Studio when you launch an application in debug mode and the application crashes, you can relaunch it immediately without recompiling or redeploying.

    You can find Xamarin.Android here https://dl.xamarin.com/XamarinforVisualStudio/Windows/Xamarin.VisualStudio_4.5.0.475.msi
    and Xamarin Studio here https://dl.xamarin.com/MonoDevelop/Windows/XamarinStudio-6.2.0.1829.msi (I tested only this version, I am happy with it and I am not going to upgrade it)

    If you are using a mac or you need something else you can find all the downloads here https://store.xamarin.com/account/my/subscription/downloads

  • MassimoLaSpinaMassimoLaSpina USMember ✭✭

    @PhilippSumi A new Visual Studio 2017 update (including Xamarin 4.0.5.476) is available. I installed it and it fixes the performance problem

  • PhilippSumiPhilippSumi USMember ✭✭✭

    @MassimoLaSpina said:
    @PhilippSumi A new Visual Studio 2017 update (including Xamarin 4.0.5.476) is available. I installed it and it fixes the performance problem

    Thanks Massimo. I switched over and can confirm it's better.

    @Xamarin however: I think performance is still not on par with what we had before 15.2. There's not a minute-long wait to start my app, and API calls seem to back to normal, but the delay is still much worse than it was before, I sometimes still have that black screen for a few seconds during app start.

  • batmacibatmaci DEMember ✭✭✭✭

    @joemo>; @PhilippSumi said:

    @MassimoLaSpina said:
    @PhilippSumi A new Visual Studio 2017 update (including Xamarin 4.0.5.476) is available. I installed it and it fixes the performance problem

    Thanks Massimo. I switched over and can confirm it's better.

    @Xamarin however: I think performance is still not on par with what we had before 15.2. There's not a minute-long wait to start my app, and API calls seem to back to normal, but the delay is still much worse than it was before, I sometimes still have that black screen for a few seconds during app start.

    this is why I am always skeptical about updating newest version. it is waste of time updating, downgrading. if you have VS2015 and 2017 side by side installed. Best to upgrade 2017 only and keep old version on 2015.

  • michaelwarnesmichaelwarnes USMember ✭✭

    are you talking about vs for the mac?

  • NMackayNMackay GBInsider, University ✭✭✭✭✭
    edited June 2

    @JimmyGarrido @DavidOrtinau

    Running into a few issues with UWP and maps in Forms 2.3.4.247, the mapspan is been ignored when set

    In PCL

                        var marker = geopos.Markers.FirstOrDefault();
                        if (Equals(marker, null)) return;
    
                        var pos = new Xamarin.Forms.Maps.Position(marker.Latitude, marker.Longitude);
                        var map = new CustomMap()
                        {
                            IsShowingUser = false,
                            MapType = MapType.Hybrid,
                            HorizontalOptions = LayoutOptions.FillAndExpand,
                            VerticalOptions = LayoutOptions.FillAndExpand,
                        };
                        var pin = new CustomPin
                        {
                            Pin = new Pin
                            {
                                Position = pos,
                                Label = marker.Title,
                                Address = marker.Address,
                            },
                            RouteCoordinates = marker.RouteCoordinates,
                            ShowCallout = false,
                            Id = marker.Address,
                            Filename = PlatformImage.GetPlatformPath(ImageResources.MapVesselIcon)
                        };
    
                        map.CustomPins = new List<CustomPin> { pin };
                        LayoutMapHandset.Children.Add(map);
                        map.Pins.Add(pin.Pin);
    
                        var mapSp = MapSpan.FromCenterAndRadius(
                                pos, Distance.FromMiles(Device.Idiom == TargetIdiom.Phone ? 500 : 450));
                        map.MoveToRegion(mapSp);
                        map.MapType = MapType.Hybrid;
    

    Renderer

    <br />using Foobar.UWP.Renderers;
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using Windows.Devices.Geolocation;
    using Windows.Storage.Streams;
    using Windows.UI.Xaml.Controls.Maps;
    using Foobar.Common.CustomRenderers;
    using Xamarin.Forms.Maps;
    using Xamarin.Forms.Maps.UWP;
    using Xamarin.Forms.Platform.UWP;
    
    [assembly: ExportRenderer(typeof(CustomMap), typeof(CustomMapRenderer))]
    namespace Foobar.UWP.Renderers
    {
        public class CustomMapRenderer : MapRenderer
        {
            CustomMap _formsMap;
            MapControl _nativeMap;
            List<CustomPin> _customPins;
            MapOverlay _mapOverlay;
            private bool _xamarinOverlayShown;
            private bool _disposed;
    
            protected override void Dispose(bool disposing)
            {
                if (_disposed)
                    return;
    
                _nativeMap.MapElementClick -= OnMapElementClick;
                _nativeMap.Children.Clear();
                _mapOverlay = null;
                _nativeMap = null;
                _formsMap = null;
                _disposed = true;
    
                base.Dispose(disposing);
            }
    
            protected override void OnElementChanged(ElementChangedEventArgs<Map> e)
            {
                base.OnElementChanged(e);
    
                if (e.NewElement != null)
                {
                    _formsMap = (CustomMap)e.NewElement;
                    _nativeMap = Control as MapControl;
                    _customPins = _formsMap.CustomPins;
    
                    _nativeMap.Children.Clear();
                    _nativeMap.MapElementClick += OnMapElementClick;
    
                    // BUG Required as map gesture rotate crashes app in UWP and Forms 2.3.2
                    _nativeMap.RotateInteractionMode = MapInteractionMode.Disabled;
    
                    foreach (var pin in _customPins)
                    {
                        var snPosition = new BasicGeoposition { Latitude = pin.Pin.Position.Latitude, Longitude = pin.Pin.Position.Longitude };
                        var snPoint = new Geopoint(snPosition);
    
                        // Add the pin
                        var mapIcon = new MapIcon
                        {
                            CollisionBehaviorDesired = MapElementCollisionBehavior.RemainVisible,
                            Location = snPoint,
                            Image = null,
                            NormalizedAnchorPoint = new Windows.Foundation.Point(0.5, 1.0)
                        };
                        if (!string.IsNullOrEmpty(pin.Filename))
                            mapIcon.Image = RandomAccessStreamReference.CreateFromUri(new Uri("ms-appx:///" + pin.Filename));
    
                        _nativeMap.MapElements.Add(mapIcon);
    
                        // Add any routes to plot
                        if (pin.RouteCoordinates.Any())
                        {
                            var coordinates = pin.RouteCoordinates.Select(coordinate => new BasicGeoposition() {Latitude = coordinate.Latitude, Longitude = coordinate.Longitude}).ToList();
    
                            var polyline = new MapPolyline
                            {
                                StrokeColor = Windows.UI.Color.FromArgb(128, 255, 0, 0),
                                StrokeThickness = 3,
                                Path = new Geopath(coordinates)
                            };
                            _nativeMap.MapElements.Add(polyline);
    
                        }
    
                        if (pin.ShowCallout)
                        {
                            if (_mapOverlay == null)
                            {
                                _mapOverlay = new MapOverlay(pin);
                            }
    
                            _nativeMap.Children.Add(_mapOverlay);
                            MapControl.SetLocation(_mapOverlay, snPoint);
                            MapControl.SetNormalizedAnchorPoint(_mapOverlay, new Windows.Foundation.Point(0.5, 0.9));
                            _xamarinOverlayShown = true;
                        }
    
                    }
                }
            }
    
            private void OnMapElementClick(MapControl sender, MapElementClickEventArgs args)
            {
                var mapIcon = args.MapElements.FirstOrDefault(x => x is MapIcon) as MapIcon;
                if (mapIcon != null)
                {
                    if (!_xamarinOverlayShown)
                    {
                        var customPin = GetCustomPin(mapIcon.Location.Position);
                        if (customPin == null)
                        {
                            throw new Exception("Custom pin not found");
                        }
    
                        _mapOverlay = null;
                        _mapOverlay = new MapOverlay(customPin);
    
                        var snPosition = new BasicGeoposition { Latitude = customPin.Pin.Position.Latitude, Longitude = customPin.Pin.Position.Longitude };
                        var snPoint = new Geopoint(snPosition);
    
                        _nativeMap.Children.Add(_mapOverlay);
                        MapControl.SetLocation(_mapOverlay, snPoint);
                        MapControl.SetNormalizedAnchorPoint(_mapOverlay, new Windows.Foundation.Point(0.5, 0.9));
                        _xamarinOverlayShown = true;
                    }
                    else
                    {
                        _nativeMap.Children.Remove(_mapOverlay);
                        _xamarinOverlayShown = false;
                    }
                }
            }
    
            CustomPin GetCustomPin(BasicGeoposition position)
            {
                var pos = new Position(position.Latitude, position.Longitude);
                return _customPins.FirstOrDefault(pin => pin.Pin.Position == pos);
            }
    
        }
    }
    
    

    1st time you create a marker the correct custom icon is displayed, every time after that the evil default marker comes back to haunt me even though the custom marker is also shown.


    The mapspan bug seems to have appeared in 2.3.4.247, the icon issues has been in all the 2.3.4 -pre releases.

    Tested on a Lumia 650, windows anniversary with latest patches.

    Don't mind creating a bugzilla and some repo's but wanted to check if the team was aware of any such UWP map issues 1st.

    Thanks.

  • JimmyGarridoJimmyGarrido USXamarin Team Xamurai

    @NMackay These issues don't seem to have been reported previously, so please go ahead and file them in Bugzilla and we'll take a look. Thank you!

  • NMackayNMackay GBInsider, University ✭✭✭✭✭

    @JimmyGarrido said:
    @NMackay These issues don't seem to have been reported previously, so please go ahead and file them in Bugzilla and we'll take a look. Thank you!

    Ok, I'll do that on Monday.

  • HalilDoganBolakHalilDoganBolak USMember ✭✭
    edited June 6

    @NMackay I also see the same bug with an additional problem - on UWP the "pins" do respond to tapping only once and then they become unresponsive to tapping - same code executes on iOS without any problems. (I am not using a custom renderer or a custom object; just the plain xamarin.forms.maps objects

  • NMackayNMackay GBInsider, University ✭✭✭✭✭

    @HalilDoganBolak

    Yeah, the UWP map renderer has gone a bit funny, I'll do a bugzilla tomorrow, I was caught up with Telerik issues today.

  • NamyslawSzymaniukNamyslawSzymaniuk USMember ✭✭✭

    Datatriggers are not working after 2.3.3 - https://bugzilla.xamarin.com/show_bug.cgi?id=56515

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    @NamyslawSzymaniuk said:
    Datatriggers are not working after 2.3.3 - https://bugzilla.xamarin.com/show_bug.cgi?id=56515

    I'm running 2.3.4 and have lots of working datatriggers on IsVisible, backgroundcolor and other properties.
    Buzilla > When using a DataTrigger to set an image Source, the setter does not fire

    So is this just DataTriggers on ImageSource - or are people seeing it on other elements/properties?

  • NamyslawSzymaniukNamyslawSzymaniuk USMember ✭✭✭

    For me it's working "randomly" at Label DataTriggers

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    That's really interesting. We've got a dedicated QA team that beats the living daylights out of our app with every new story that goes to testing. There are buttons and labels and grid that change color, text and visibility based on all sorts of things via DataTrigger....
    Scan a page a button becomes enabled.
    It has a barcode, something else changes from red to green
    Its a pre-approved type, so the [accept] button becomes visible and the 'type' box gets a background
    blah blah blah
    If they had seen random behavior from all those DataTriggers I would have been flogged severely about it.

    So I wonder what the difference is. For example, all our work is on various ContentViews which are then placed on a ContentPage. None of the low-level controls (label, button etc) are actually on a Page directly.

    I can say this... BackgroundColor of a Label is horrible to begin with. Heck, Label is bad in many ways and I've bitched about in Bugzilla before. Label behaves differently than expected for things like StartAndExpand and CenterAndExpand - and behaves differently when in a StackLayout than when it isn't in a StackLayout. The Xamarin guys gave me 5 paragraphs of how that is all 'intended behavior to be different inside a StackLayout' etc. etc. etc. - but I don't buy it. "Doesn't work like 5m people in the real-world expect" is a bug, whether it was how 3 people in a lab intended or not.

    The Label itself under any conditions is random. Sometimes a CenterAndExpand label would left align the text when the page opens, then center it when you navigate forward and back... Othertimes its centered correctly when the page opens. Othertimes it won't leave left alignment no matter what you do.

    Eventually I had to stop working Labels as I should have been able to - as I would have safely in WPF. I had to play games with nesting Label inside a Grid, then work the grid for its BackgroundColor, expanding and alignment etc.

    This is a prime example of the "Fix the basic functionality issues, before adding esoteric extras" that I rant about now and again. You can't get much more basic than a Label and even that exhibits random behavior and strange sets of rules based on whether or not its parent container is a this or a that. {getting off my soapbox now}

  • BradChase.2654BradChase.2654 USMember ✭✭✭
    edited June 7

    @ClintStLaurent A word of the wise get rid of StackLayout COMPLETELY. That thing does NOT behave as it should in many cases. We ended up switching everything over to Grids. The problem after that was that the Grid code also has problems. I thought initially that the Label code was the incorrect one but it ended up being the StackLayout and GridCalc code that caused the issues. I have an open PR and an open bugzilla about some small issues but they are just sitting there.

    Also note that in Android it gets really bad if you leave the app and then return to it. So what I did was drop out ALL StackLayouts completely and then rewrote the GridCalc code and we no longer have issues with labels. Word of warning though, the GridCalc code takes no prisoners. Meaning your layouts have to be correct, they cant have *'s inside of an auto height and so on and so on.

    EDIT: I do feel ya on time wasted on some things. I still cant believe the CSS styling stuff. ughhh. But then again I got what I wanted (macOS), so I guess there are others who needed web ui style development in XAML and others who needed other OSs.

  • DavidDancyDavidDancy AUMember ✭✭✭✭

    @ClintStLaurent @BradChase.2654 I agree with you about StackLayout vs Grid. I have never been able to get the StackLayout to behave in a way that feels intuitive, especially with the End layout option.

    On the problems with Label if you look in the renderer you can see that the background colour is set in the container rather than in the UILabel on iOS. (This will no longer be the case with "Fast" renderers though). This means that if you subclass the LabelRenderer (say to make one with rounded corners) the Label will have your enhancements but the background colour will be applied incorrectly. It was explained to me that the reason for this was to get around the iOS lack of vertical alignment within the UILabel object. However that doesn't help much when your label gets mucked up.

  • KyleWarrenKyleWarren USUniversity ✭✭
    Is this versions bug fixes and hot fixes also merged into 2.3.5 pre3?
  • BradChase.2654BradChase.2654 USMember ✭✭✭
    edited June 8
    @DavidDancy yeah I always thought of a stacklayout to behave more like a grid where the columns or rows are not set explicitly set but are dynamic based on the content element's need of fill or auto(start center end).

    A little off point but when I don't see things laying out the way I think they should, I tell developers to put ugly background colors on the parent panels so they can see if a control is taking up the space they think it is. That said, if you have a stacklayout with different children and put a background color on it while it is set to fill, then I would think three children, start, fill, end in order should take that allotted space up in the full distance of the stack's fill. That may happen or not, I have stopped using them all together. But... Even if it did, we found that collapsing panels and other activities of visibility would cause them to cut off labels and other elements and never return back to it's corrected state until you literally set the widthrequest to a number and then reset to -1. That problem stems to a larger issue where the layout and measure passes aren't being called correctly or invalidated correctly. The grid has that very same issue. That is why the grid calls measure everytime in its layout.

    As far as label's background, we ALWAYS wrap it in a panel to show it's background for padding purposes. It would be nice if every control had a padding property but I am sure that would effect performance and then that's a bigger issue. So I kinda understand that part. Wrapping it adds a performance decrease at the expense of UI design but leaves it in the developers hands.

    Hope that makes sense. I guess two things that I would petition for is a rewrite of the stacklayout and grid but leave the label alone? Or even a dynamic renderer that replaces it's controls heirarchy if needed with padding on the element to take care of the label issue or other controls like it.
  • RafaLenRafaLen USMember ✭✭

    I have updated Xamarin.Forms to 2.3.4.247 in Core, Droid and iOS project and when app starts throws the next excepción:
    System.TypeLoadException
    Could not resolve type with token 01000054 (from typeref, class/assembly Xamarin.Forms.Xaml.XamlFilePathAttribute, Xamarin.Forms.Xaml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null)
    I don't know what to do.
    Please help me!

  • NMackayNMackay GBInsider, University ✭✭✭✭✭
    edited June 8

    @JimmyGarrido said:
    @NMackay These issues don't seem to have been reported previously, so please go ahead and file them in Bugzilla and we'll take a look. Thank you!

    @JimmyGarrido

    Sorry for the delay in getting this filed.

    https://bugzilla.xamarin.com/show_bug.cgi?id=57270

    Would be nice if this could be fixed for 2.3.5 :)

  • VelocityVelocity NZMember ✭✭✭

    Both StackLayout and Grid have their uses and applications.
    There is a similar difference between comparing a <div> with a <table> tag in HTML.

    Of course you can use a <table> to do layouts, but often a <div> will work nicely.
    Jason Smith's performance notes from Evolve 2016 hit the nail on the head nicely:

    • Do not use a Grid when a StackLayout suffices.
    • Do not use multiple StackLayouts when a Grid suffices.
  • thanhtongthanhtong VNMember ✭✭

    @DavidOrtinau I have a question. How can I use Xamarin Form project with my project, without install Xamarin.Form package?
    I tried to get and build Xamarin Form version 2.3.4.
    But I got some errors.
    I see that everyone fixed and commit to https://github.com/xamarin/Xamarin.Forms
    How to pass test it if he can not build Xamarin Form project ?

  • JoeMankeJoeManke USMember ✭✭✭

    @thanhtong You do not need to download and compile the Xamarin.Forms source code. Install the Nuget package from https://www.nuget.org/packages/Xamarin.Forms

  • thanhtongthanhtong VNMember ✭✭

    @JoeManke Thanks, but It is not my need.
    I want to detect this issue https://bugzilla.xamarin.com/show_bug.cgi?id=58351
    So how to customize Xamarin Form solution, then build it without errors?

Sign In or Register to comment.