This is a migrated thread and some comments may be shown as answers.

FreshEssentials controls within Sidedrawer start behaving weird

4 Answers 40 Views
SideDrawer
This is a migrated thread and some comments may be shown as answers.
Michel
Top achievements
Rank 1
Michel asked on 30 Mar 2017, 09:34 AM

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 :(

4 Answers, 1 is accepted

Sort by
0
Michel
Top achievements
Rank 1
answered on 30 Mar 2017, 09:49 AM
One importent adition, on Android it all works fine. The weird behavior is on IOS only.
0
Nikolay Demirev
Telerik team
answered on 04 Apr 2017, 02:26 PM
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  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
0
Michel
Top achievements
Rank 1
answered on 06 Apr 2017, 12:16 PM

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

0
Nikolay Demirev
Telerik team
answered on 10 Apr 2017, 10:01 AM
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
Tags
SideDrawer
Asked by
Michel
Top achievements
Rank 1
Answers by
Michel
Top achievements
Rank 1
Nikolay Demirev
Telerik team
Share this question
or