FreshEssentials controls within Sidedrawer start behaving weird

5 posts, 0 answers
  1. Michel
    Michel avatar
    18 posts
    Member since:
    Oct 2016

    Posted 30 Mar Link to this post

    I have some pages with settings per page in a master details menu configuration. I am hiding /showing this settings and all works fine.  But now I want to put the settings in a sidedrawer for a nice effect.

    Now I have embedded the page in the main content and the settings in the drawer content . But when I do that some (FreshEssentials) controls start behaving really weird.(fe: is the namespace xmlns:fe="clr-namespace:FreshEssentials;assembly=FreshEssentials")

    1. I have a listview with a fe:ListViewItemTappedAttached.Command to detect when an item is tapped. This works fine initially. But when I navigate to an other page and come back its command is suddenly called 3 times. When I navigate back and forth again it is called 5 times? Without Sidedrawer it worked fine?

    2. I am using the fe:BindablePicker and when it is embedded in a sidedrawer the selecteditem value is set to null when I navigate to the page? This does not happen when it is not embedded within the sidedrawer.

    The sideviewer control is really nice but these weird side effects make it useless to me :(

  2. Michel
    Michel avatar
    18 posts
    Member since:
    Oct 2016

    Posted 30 Mar in reply to Michel Link to this post

    One importent adition, on Android it all works fine. The weird behavior is on IOS only.
  3. Nikolay Demirev
    Admin
    Nikolay Demirev avatar
    136 posts

    Posted 04 Apr Link to this post

    Hello Michel,

    I have investigated the issues you are describing and I was able to isolate and fix the issue causing both of them. It will be released with the next internal build. 

    Meanwhile, I can suggest you a workaround for the first one. I have found out something strange. The ItemTapped event is triggered once, but the command is called 3 times. I have checked the implementation of the fe:ListViewItemTappedAttached and I have found that the attached property is attached 3 times to the event due to change of the BindingContext. The changing of the BindingContext is triggered by the adding of the SideDrawer content to the UI. My suggestion is to update the OnItemTappedChanged method of the ListViewItemTappedAttached to detach from the ItemTapped event before attaching a new handler. Here is the updated code snippet:
    public static void OnItemTappedChanged(BindableObject bindable, object oldValue, object newValue)
    {
        var control = bindable as ListView;
        if (control != null)
        {
            control.ItemTapped -= OnItemTapped;
            control.ItemTapped += OnItemTapped;
        }
    }

    Regards,
    Nikolay Demirev
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  4. Michel
    Michel avatar
    18 posts
    Member since:
    Oct 2016

    Posted 06 Apr Link to this post

    Hi Nikolay,

    Thank you for investigating and fixing this. I do think I would prefer to wait for a new release if that will be available soon.

    Can you tell in what timespan we can expect a new release with this fix?

     

    With kind regards,

    Michel

  5. Nikolay Demirev
    Admin
    Nikolay Demirev avatar
    136 posts

    Posted 10 Apr Link to this post

    Hi Michel,

    We expect to release the next internal build by the end of the week, and the next official release somewhere around the beginning of May.

    Regards,
    Nikolay Demirev
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top