Bug 43706 - Setting ControlTemplate in code-behind gets rid of BindingContext for UI elements
Summary: Setting ControlTemplate in code-behind gets rid of BindingContext for UI elem...
Status: RESOLVED DUPLICATE of bug 43685
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.2
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-08-24 16:41 UTC by adrianknight89
Modified: 2017-06-13 13:51 UTC (History)
3 users (show)

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


Attachments
repro (217.06 KB, application/zip)
2016-08-24 16:41 UTC, adrianknight89
Details


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:
Status:
RESOLVED DUPLICATE of bug 43685

Description adrianknight89 2016-08-24 16:41:42 UTC
Created attachment 17194 [details]
repro

Not sure if this is PRISM or XF issue. Please see: https://github.com/PrismLibrary/Prism/issues/743

I also attached a repro here.
Comment 1 adrianknight89 2016-09-07 18:47:48 UTC
Can this get some attention? It has NOT been confirmed yet.
Comment 2 adrianknight89 2016-09-11 02:04:30 UTC
This is an XF issue. The workaround was to set the BindingContext of the list view after the page control template is set.

MyListView.BindingContext = this.BindingContext;

in the constructor for Page2.
Comment 3 adrianknight89 2016-10-12 03:34:12 UTC
Referencing https://bugzilla.xamarin.com/show_bug.cgi?id=43685
Comment 4 Stephane Delcroix 2017-06-13 13:51:10 UTC
The sample you provided works ok (the list is loaded) as is. It's unclear (due to the lack of description) what your problem is.

I'm closing this as a dupe of #43685 and will focus on that one (I can reproduce the behavior reported in the description).

If you think it's not a duplicate, please reopen and update your description so we can understand what works, what does not, and what are your expectations.

*** This bug has been marked as a duplicate of bug 43685 ***