Bug 30684 - x:Reference does not escape DataTemplate so you can't bind to values in the parent ListView
Summary: x:Reference does not escape DataTemplate so you can't bind to values in the p...
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.4.4
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Stephane Delcroix
: 27532 ()
Depends on:
Reported: 2015-06-02 14:20 UTC by Rob DeRosa
Modified: 2015-11-17 05:20 UTC (History)
7 users (show)

Tags: ac xaml
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 Rob DeRosa 2015-06-02 14:20:17 UTC
x:Reference does not escape DataTemplate so you can't bind to values in the parent ListView. This really limits the ability to bind to anything outside the current row - we really need the ability to access values outside the current binding context/row as we don't have RelativeAncestory or ElementName to use.

Comment 1 Jason Smith [MSFT] 2015-06-02 14:39:40 UTC
*** Bug 27532 has been marked as a duplicate of this bug. ***
Comment 2 Stephane Delcroix 2015-06-15 16:57:38 UTC
will be fixed in 1.3.4
Comment 3 Stephane Delcroix 2015-06-15 16:58:38 UTC
I mean 1.4.3
Comment 4 Aboo 2015-11-17 05:18:59 UTC
I have updated to the latest stable version today 17 Nov 2015 and still x:Reference doesn't work for me inside DataTemplate

<Label Text="Test" x:Name="MyLabel"></Label>
<Label Text="{Binding Source={x:Reference MyLabel}, Path=Text}"></Label> <!--works here-->
<ListView ItemsSource="{Binding Options}" x:Name="OptionsListView">
			<TextCell BindingContext="{x:Reference MyLabel}" Text="{Binding Text}">></TextCell> <!--doesn't work here-->
Comment 5 Stephane Delcroix 2015-11-17 05:20:45 UTC
@Aboo: this issue was solved and is closed. Your issue look different, please open a new one.