Xamarin.Forms 2.3.3.193

135678

Posts

  • ErikRenaud.2326ErikRenaud.2326 CAMember

    I've tried this new pre release and have this error with XAMLC
    Severity Code Description Project Project Rank File Line Suppression State
    Error Position 20:103. No property, bindable property, or event found for 'AddCommand' Views.Tabs.TodoPage.xaml 20

    i used to have another problem which was that the AddCommand of my CustomControl was not binded correctly and i had to cast the binding context and then cast to the vm type and then just call the command directly.

    Any ideas ?

    It happens only for bindable properties named AddCommand or DeleteCommand and even though i rename them it doesn't seem to fix anything...

  • StephaneDelcroixStephaneDelcroix ✭✭✭✭ USInsider, Beta ✭✭✭✭

    @ErikRenaud.2326 is this a regression ? In any case, could you please tell me how to reproduce that bug, either here, on bugzilla, or by mail ?

    Thanks a lot

  • Shane000Shane000 ✭✭✭ USMember ✭✭✭

    Does anyone know when the xamarin.forms on mac is going to be able to become .net core over pcl? Having trouble finding info on that stuff. Seems like a lot of libraries will need to be updated first for many projects.

  • AdrianKnightAdrianKnight ✭✭✭✭ USMember ✭✭✭✭

    I noticed that soft keyboard display animation isn't smooth on iOS when the app cold starts. This started happening when I switched to iOS 10 & XF latest pre-release. The keyboard shows on the second page of the landing screen on appearing.

    Has anyone come across a similar problem?

  • AndrewMobileAndrewMobile ✭✭✭✭ USMember ✭✭✭✭
    edited October 2016

    MajorListView performance issue which also reproduces in 2.3.3-pre3: https://bugzilla.xamarin.com/show_bug.cgi?id=45689

  • AndrewMobileAndrewMobile ✭✭✭✭ USMember ✭✭✭✭

    Also this bug is still in 2.3.3-pre3 https://bugzilla.xamarin.com/show_bug.cgi?id=45727

    There are other several bugs still present in 2.3.3-pre3....

  • NMackayNMackay mod GBInsider, University mod

    This one is a pain, any chance it could get looked at too?

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

  • DarkwingDuckDarkwingDuck ✭✭ USMember ✭✭

    This bug has already been confirmed but has never been fixed: https://bugzilla.xamarin.com/show_bug.cgi?id=41639
    Please fix this..

  • rmarinhormarinho Xamurai PTMember, Insider, Beta Xamurai

    @ShanePope why do you ask? Anything special? Aren't you referencing to netstandard ? If so we talked but there aren't plans yet to move our PCL's to netstandard.

    If you have special issues with the Mac backend ping me via pm.

  • NMackayNMackay mod GBInsider, University mod

    @rmarinho

    Is there a roadmap for Forms to move to .netstandard or what's the official advice on that one?

  • Shane000Shane000 ✭✭✭ USMember ✭✭✭

    @rmarinho Automapper requires it to update so I wasn't sure how quickly things are moving in general towards it. No need for it I just wanted to be prepared if it was soon on the roadmap.

  • FezZFezZ ✭✭ BYMember ✭✭

    Can somebody show an example, how to use native views correctly, for example, i want to call Android GridView and make a data template for it?

  • BjornBBjornB ✭✭✭ USMember ✭✭✭

    Can we expect a new update soon? so much good stuff jammed in for the next release :)

  • JohnHardmanJohnHardman mod GBUniversity mod

    @BryanHunterXam @StephaneDelcroix @rmarinho - It's probably a bit late in the day, but is there any chance of getting https://bugzilla.xamarin.com/show_bug.cgi?id=41054 addressed in this release? I've tried all the obvious workarounds but nothing works well enough to release to an end user.

  • BjornBBjornB ✭✭✭ USMember ✭✭✭
    edited October 2016

    @JohnHardman said:
    @BryanHunterXam @StephaneDelcroix @rmarinho - It's probably a bit late in the day, but is there any chance of getting https://bugzilla.xamarin.com/show_bug.cgi?id=41054 addressed in this release? I've tried all the obvious workarounds but nothing works well enough to release to an end user.

    what have you tried? I dont want to install windows sdk to test it, but I do know some ways to do this "in a good way" without a behaviour. Is it only the behaviour that it bugged? or is it changing textcolor on uwp in general?

    The most simplest way would be to do it in codebehind like this.

    if (Device.OS == TargetPlatform.Windows) { entry.Style = null; entry.TextChanged += (sender, args) => { double result; bool isValid = double.TryParse(args.NewTextValue, out result); ((Entry)sender).TextColor = isValid ? Color.Default : Color.Red; }; }

    If you dont like coding in codebehind (you shouldnt like that :smile: ) , you could do it against a viewmodel and bind the textcolor and ofc the text, validate it and change the color accordingly. Another approach would be to do it in a converter that returns the textcolor and uses the text as input to validate.

  • JohnHardmanJohnHardman mod GBUniversity mod
    edited October 2016

    @BjornB - The list of things tried is long :-)

    As an aside, there is a general issue with TextColor on Entry views in UWP, which can be worked around to a certain extent using Windows.UI.Xaml.Style. For more info, see https://forums.xamarin.com/discussion/comment/229383/#Comment_229383 . In the latest stable release, even that is much better than it was previously.

    But, when setting TextColor for an Entry from a Behavior, the issue is much harder to workaround. See https://bugzilla.xamarin.com/show_bug.cgi?id=41054 for the bug report. Basically, although the TextColor property changes, the change is not reflected on screen until the user moves the focus away from the Entry and moves it back again. This can be done programmatically, and with some extra effort to reposition the caret, it might look at first sight as if it works on desktop. However, the move of focus makes the result of typing non-deterministic (keystrokes might not go to the Entry and the focus may never return to the Entry). On phones, the move of focus makes the keyboard disappear and reappear, which is most unpleasant. Even changing the Windows.UI.Xaml.Style does not work at this point.

    As well as moving the focus programmatically, I tried all sorts of other things. Toggling IsVisible twice has a similar result to moving the focus. Nothing else that I tried came close to the desired effect. Normally for things like this, I would invalidate the view, so that it is re-drawn. However, in this particular case, invalidating the view, re-sizing the view, changing the font size, changing opacity, changing the backround color, scaling the view, etc., all had no useful effect.

    Using TextChanged to change TextColor, instead of using a Behavior, similarly makes no difference until the focus is moved elsewhere.

  • BrainSlugs83BrainSlugs83 ✭✭ USMember ✭✭

    I just tried to update to the pre4 today -- Nuget.org says the package was last updated today, and has "0 downloads", so I might be one of the first to post this issue -- but the package is malformed in some way; -- I tried reinstalling it many times, and always end up with the same errors.

  • BrightLeeBrightLee ✭✭✭ KRMember ✭✭✭

    Can't update pre4 from nuget package / Xamarin studio (mac)

    Installing Xamarin.Forms 2.3.3.165-pre4.
    Error downloading 'Xamarin.Forms.2.3.3.165-pre4' from 'https://www.nuget.org/api/v2/package/Xamarin.Forms/2.3.3.165-pre4'.
    Nullable object must have a value.
    Install failed. Rolling back...
    Package 'Xamarin.Forms.2.3.3.165-pre4' does not exist in project 'allbX'

  • DH_HA1DH_HA1 ✭✭✭ USMember ✭✭✭

    @TheRealJasonSmith @BryanHunterXam I also cannot install 2.3.3.165-pre4

  • P3PPPP3PPP ✭✭ JPMember ✭✭

    [Platform Specifics]
    Xamarin.Forms.PlatformConfiguration.iOSSpecific.NavigationPage and Xamarin.Forms.NavigationPage are conflict when using On<iOS>().SetIsNavigationBarTranslucent() .

    Xamarin.Forms.PlatformConfiguration.iOSSpecific.NavigationPage class should be be renamed.

  • BjornBBjornB ✭✭✭ USMember ✭✭✭

    Is there any documentation on platformconfiguration?

  • BradChase.2654BradChase.2654 ✭✭✭ USMember ✭✭✭

    @PhilipGruebele said:
    Regarding Android performance people mentiond Tarjan GC, but not other relevant settings. The following environment.txt improved both app startup and responsiveness:

    MONO_GC_PARAMS=bridge-implementation=tarjan,nursery-size=128m,soft-heap-limit=256m

    The main idea is to avoid random collections and GC manually at opportune times.

    Also as far as performance goes, we sped our android side up a TON by doing a bunch of different things buy mainly was fixing a bug in xamarin's code that builds all of the DataTemplates you have in XAML over and over down the tree without ever calling createcontent. If you use alot of DataTemplates like us then you can gain ALOT of speed by fixing that bug and using a custom forms.xaml dll for deployment...

    I outlined it here: https://bugzilla.xamarin.com/show_bug.cgi?id=45179

  • DH_HA1DH_HA1 ✭✭✭ USMember ✭✭✭

    @BradChase.2654 can you share the code you did to fix this? Also the other things you fixed to get Android to perform better

  • PhilipGruebelePhilipGruebele ✭✭ USMember ✭✭

    @BradChase.2654 I also saw some inefficient happenings with templates and would love to see a pull request with your changes.

  • BradChase.2654BradChase.2654 ✭✭✭ USMember ✭✭✭

    @PhilipGruebele @DH_HA1 I wouldnt mind putting the code up but unfortunately I have not had to the time to fix it professionally. I made a quick work around for a single deploy for a conference with the hopes Xamarin will make an actual fix. I tried to use their latest code and pulled from github but the code doesnt run at all with our app. To also mention the latest on nuget doesnt either. I went through all the branches just about down to 2.3.2.127 and that was the first build that actually builds for us.

    That said Ill attach the dll if you want to check the speed increases and if its worth while to even bother for your apps. The code is simple for a proof of concept:

    Get the 2.3.2.127 code or branch: Xamarin.Forms-release-2.3.2-hf1

    in CreateValuesVisitor.Visit replace with:

    `
    public void Visit(ElementNode node, INode parentNode)
    {
    object value = null;

            if (node.SkipPrefix(node.NamespaceResolver.LookupPrefix(node.NamespaceURI)))
                return;
    
            XamlParseException xpe;
            var type = XamlParser.GetElementType(node.XmlType, node, Context.RootElement?.GetType().GetTypeInfo().Assembly,
                out xpe);
            if (xpe != null)
                throw xpe;
    
            Context.Types[node] = type;
            string ctorargname;
            if (IsXaml2009LanguagePrimitive(node))
                value = CreateLanguagePrimitive(type, node);
            else if (node.Properties.ContainsKey(XmlName.xArguments) || node.Properties.ContainsKey(XmlName.xFactoryMethod))
                value = CreateFromFactory(type, node);
            else if (
                type.GetTypeInfo()
                    .DeclaredConstructors.Any(
                        ci =>
                            ci.IsPublic && ci.GetParameters().Length != 0 &&
                            ci.GetParameters().All(pi => pi.CustomAttributes.Any(attr => attr.AttributeType == typeof (ParameterAttribute)))) &&
                ValidateCtorArguments(type, node, out ctorargname))
                value = CreateFromParameterizedConstructor(type, node);
            else if (!type.GetTypeInfo().DeclaredConstructors.Any(ci => ci.IsPublic && ci.GetParameters().Length == 0) &&
                     !ValidateCtorArguments(type, node, out ctorargname))
            {
                throw new XamlParseException(
                    String.Format("The Property {0} is required to create a {1} object.", ctorargname, type.FullName), node);
            }
            else
            {
                //this is a trick as the DataTemplate parameterless ctor is internal, and we can't CreateInstance(..., false) on WP7
                try
                {
                    if (type == typeof (DataTemplate))
                        value = new DataTemplate();
                    if (type == typeof (ControlTemplate))
                        value = new ControlTemplate();
                    if (value == null && node.CollectionItems.Any() && node.CollectionItems.First() is ValueNode)
                    {
                        var serviceProvider = new XamlServiceProvider(node, Context);
                        var converted = ((ValueNode)node.CollectionItems.First()).Value.ConvertTo(type, () => type.GetTypeInfo(),
                            serviceProvider);
                        if (converted != null && converted.GetType() == type)
                            value = converted;
                    }
    
                    if (ElementNode.IsDataTemplateTest(parentNode))
                    {
                        System.Diagnostics.Debug.WriteLine("IN DATATEMPLATE TEST!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                        value = new View();
                        //return;
                    }
                    else
                    {
                        if (value == null)
                            value = Activator.CreateInstance(type);
                    }
                }
                catch (TargetInvocationException e)
                {
                    if (e.InnerException is XamlParseException || e.InnerException is XmlException)
                        throw e.InnerException;
                    throw;
                }
            }
    
            Values[node] = value;
    
            var typeExtension = value as TypeExtension;
            if (typeExtension != null)
            {
                var serviceProvider = new XamlServiceProvider(node, Context);
    
                var visitor = new ApplyPropertiesVisitor(Context);
                foreach (var cnode in node.Properties.Values.ToList())
                    cnode.Accept(visitor, node);
                foreach (var cnode in node.CollectionItems)
                    cnode.Accept(visitor, node);
    
                value = typeExtension.ProvideValue(serviceProvider);
    
                node.Properties.Clear();
                node.CollectionItems.Clear();
    
                Values[node] = value;
            }
    
            if (value is BindableObject)
                NameScope.SetNameScope(value as BindableObject, node.Namescope);
        }
    

    `

    in XamlNode.cs add:

    internal static bool IsDataTemplateTest(INode parentNode) { var parentElement = parentNode as IElementNode; INode createContent; if (parentElement != null && parentElement.Properties.TryGetValue(XmlName._CreateContent, out createContent) ) return true; return false; }

    Again this is JUST TEST CODE. I wanted to narrow down where it was and test the speed. I had a much more final change done but I could not get it running for one reason or another(read latest github code wouldnt work for us). The value = new View(); is in there because some other code somewhere requires it not be null and must be a view, so got me there. You should prolly change the IsDataTemplateTest to just use internal static bool IsDataTemplate(INode node, INode parentNode) function. Also this code is used to compile the xaml at build time using Xamarin.Forms.Build.Tasks.. So the code has to work in use and in build.

    OK all that said, here is the simpliest way to test it... goto 2.3.2.127 and take the Xamarin.Forms.Xaml.dll I am attaching and place it in your packages->Xamarin.Forms.2.3.2.127->lib->(MonoAndroid10, portable..., Xamarin.iOS10) directories.

    Damn, DLL's arent allowed, try this:

    https://github.com/BradChase2011/SavedPackages and grab the Xamarin.Forms.Xaml.dll and overwrite your dlls outlined above.

  • JKayJKay ✭✭✭ USMember ✭✭✭

    @BradChase.2654 Nice tips. I see you mention changing the garbage collection settings. do you have any notes on how you did this?

  • BradChase.2654BradChase.2654 ✭✭✭ USMember ✭✭✭

    @JKay We have an environment.txt file we keep in our main droid project, go to the bottom of this
    link:
    https://developer.xamarin.com/guides/android/advanced_topics/garbage_collection/

    this is the line we use:
    MONO_GC_PARAMS=nursery-size=128m,bridge-implementation=tarjan

    also go to your project settings->Android Options->Advanced tab -> Java Max Heap Size. We set this to "1G" without the quotes. That may be too high for most people for us its just right. Of course now with the datatemplate fix we might be able to lower it quite a bit.

    I forgot to mention we also do caching at the beginning of our app start and we clear the gc after each cache load. This helps by the time they start a view that they are not waiting for the collection at that point...

  • PhilipGruebelePhilipGruebele ✭✭ USMember ✭✭

    The only thing I would add to @BradChase.2654's list is to use the FFImageLoading nuget in order to resize images. CachedImage is a drop-in replacement for Image and has nice functionality. For example I have a background image which I adapt to the native resolution using

                            DownsampleUseDipUnits = true,
                            DownsampleWidth = screenDipWidth / 3,
    

    Large image assets can really slow Android down. The library also supports delayed loading and other means of speeding things up.

  • BradChase.2654BradChase.2654 ✭✭✭ USMember ✭✭✭

    @PhilipGruebele good catch on that. We only use svgs so I haven't experienced any slow downs yet there.

  • JKayJKay ✭✭✭ USMember ✭✭✭

    @BradChase.2654 What do you use for your SVGs? This is something I have been wanting to use in my project for a while but never found a good package

  • BradChase.2654BradChase.2654 ✭✭✭ USMember ✭✭✭

    @JKay We use this one:

    https://github.com/paulpatarinski/Xamarin.Forms.Plugins

    We actually forked it quite a long time ago to add color changing on the fly at:

    https://github.com/BradChase2011/Xamarin.Forms.Plugins

    Its old code though and hasnt been updated from master in quite awhile. I also have not added UWP support which I will need to do when we target desktop platforms. So if you dont need to change colors on the fly then go with paulpatarinskis libary. I will need to update my code at some point as I have modified the one we use in our control library.

    Sorry I couldnt be more help on it. If I had more time in the day I would update the github repository and get it running with all the new bells and whistles.

  • BrightLeeBrightLee ✭✭✭ KRMember ✭✭✭

    Thanks Xamarin.
    This update solved many problems of mine.

  • rmarinhormarinho Xamurai PTMember, Insider, Beta Xamurai

    Hi everyone we just pushed stable packages of 2.3.3, only change from 2.3.3-pre4 is a fix related with a exception when popping pages.

  • JeffDalbyJeffDalby ✭✭ USUniversity ✭✭

    Just tried the new 2.3.3.168 stable, and it still completely breaks us on iOS. Visibility changes sometimes don't happen, content views with a different background color and a bit of padding to make a border around other views don't draw if they weren't visible when the page is created, and the worst issue is we're getting null reference exceptions reporting "Error: An error occurred while executing MTouch" when navigating around (we use prism and it's all modal navigation). So far those exceptions seem to occur randomly, and I've yet to find steps that duplicate it.

    All of those issues go away by simply reverting to 2.3.2.127.

    On the plus side it seems the issue with keyboards overlaying listviews breaking their ability to scroll seems to be fixed.

  • BrightLeeBrightLee ✭✭✭ KRMember ✭✭✭

    2.3.3-pre4 was working fine.
    but 2.3.3-stable ruins many ui of our app especially on ListView. (tested on iOS 9)
    Don't know why this happens if only change was popping page.

  • FranciscoGGFranciscoGG ✭✭ ESMember ✭✭

    I have updated to version 2.3.3.168 and the BackgroundColor property is not working for elements which are inside .......

    What is happening?

Sign In or Register to comment.