Bug 26323 - Android XF LowerChild() & RaiseChild() with data bound controls mixes up BindingContext
Summary: Android XF LowerChild() & RaiseChild() with data bound controls mixes up Bind...
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.2
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-01-23 01:30 UTC by philip
Modified: 2015-05-19 05:04 UTC (History)
5 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description philip 2015-01-23 01:30:05 UTC
I have a DataTemplate which is bound to a list of BindingContext items.  When I use LowerChild() to change the Z order, it appears to change the index of the UIElement but also changes the index of the BindingContext used for that element. I.e. the BindingContext gets swapped between elements.

I would assume that the intended behavior is that when calling LowerChild(), the BindingContext for that element is not changed.  I guess the element BindingContext is maintained as an index and that index changes with LowerChild even though the real index of the underlying data did not change.

Needless to say this really messes things up!
Comment 1 Eric Maupin 2015-05-18 19:39:41 UTC
Can you provide a sample of what you're attempting? Raise/LowerChild are members of Layout, but there are no DataTemplate based controls that are subclasses of Layout.
Comment 2 philip 2015-05-18 19:46:19 UTC
I changed my project around to avoid this bug long time ago so I don't have a working repeatable sample anymore. I had my own datatemplate based control which was based on the similar XLabs control.  It is possible the bug was in that code but I don't remember now.  At the time I had determined it was an XF bug.

So I think for practical purposes we can close this?
Comment 3 Udham Singh 2015-05-19 05:04:21 UTC
If you will get this issue again in future please Re-open this issue with sample app that demonstrate this.

For now I am closing this issue.