payload: {"action":"closed","issue":{"url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/6192","repository_url":"https://api.github.com/repos/xamarin/Xamarin.Forms","labels_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/6192/labels{/name}","comments_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/6192/comments","events_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/6192/events","html_url":"https://github.com/xamarin/Xamarin.Forms/issues/6192","id":444153645,"node_id":"MDU6SXNzdWU0NDQxNTM2NDU=","number":6192,"title":"[Bug] XAML x:Name + Binding reference doesn't work on nested layouts binding","user":{"login":"akamud","id":954102,"node_id":"MDQ6VXNlcjk1NDEwMg==","avatar_url":"https://avatars0.githubusercontent.com/u/954102?v=4","gravatar_id":"","url":"https://api.github.com/users/akamud","html_url":"https://github.com/akamud","followers_url":"https://api.github.com/users/akamud/followers","following_url":"https://api.github.com/users/akamud/following{/other_user}","gists_url":"https://api.github.com/users/akamud/gists{/gist_id}","starred_url":"https://api.github.com/users/akamud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akamud/subscriptions","organizations_url":"https://api.github.com/users/akamud/orgs","repos_url":"https://api.github.com/users/akamud/repos","events_url":"https://api.github.com/users/akamud/events{/privacy}","received_events_url":"https://api.github.com/users/akamud/received_events","type":"User","site_admin":false},"labels":[{"id":772612655,"node_id":"MDU6TGFiZWw3NzI2MTI2NTU=","url":"https://api.github.com/repos/xamarin/Xamarin.Forms/labels/a/Xaml%20%3C/%3E","name":"a/Xaml </>","color":"dfe271","default":false},{"id":978571036,"node_id":"MDU6TGFiZWw5Nzg1NzEwMzY=","url":"https://api.github.com/repos/xamarin/Xamarin.Forms/labels/e/4%20:clock4:","name":"e/4 :clock4:","color":"23d3cd","default":false},{"id":343860851,"node_id":"MDU6TGFiZWwzNDM4NjA4NTE=","url":"https://api.github.com/repos/xamarin/Xamarin.Forms/labels/t/bug%20:bug:","name":"t/bug :bug:","color":"fc2929","default":false}],"state":"closed","locked":false,"assignee":{"login":"StephaneDelcroix","id":313003,"node_id":"MDQ6VXNlcjMxMzAwMw==","avatar_url":"https://avatars0.githubusercontent.com/u/313003?v=4","gravatar_id":"","url":"https://api.github.com/users/StephaneDelcroix","html_url":"https://github.com/StephaneDelcroix","followers_url":"https://api.github.com/users/StephaneDelcroix/followers","following_url":"https://api.github.com/users/StephaneDelcroix/following{/other_user}","gists_url":"https://api.github.com/users/StephaneDelcroix/gists{/gist_id}","starred_url":"https://api.github.com/users/StephaneDelcroix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StephaneDelcroix/subscriptions","organizations_url":"https://api.github.com/users/StephaneDelcroix/orgs","repos_url":"https://api.github.com/users/StephaneDelcroix/repos","events_url":"https://api.github.com/users/StephaneDelcroix/events{/privacy}","received_events_url":"https://api.github.com/users/StephaneDelcroix/received_events","type":"User","site_admin":false},"assignees":[{"login":"StephaneDelcroix","id":313003,"node_id":"MDQ6VXNlcjMxMzAwMw==","avatar_url":"https://avatars0.githubusercontent.com/u/313003?v=4","gravatar_id":"","url":"https://api.github.com/users/StephaneDelcroix","html_url":"https://github.com/StephaneDelcroix","followers_url":"https://api.github.com/users/StephaneDelcroix/followers","following_url":"https://api.github.com/users/StephaneDelcroix/following{/other_user}","gists_url":"https://api.github.com/users/StephaneDelcroix/gists{/gist_id}","starred_url":"https://api.github.com/users/StephaneDelcroix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StephaneDelcroix/subscriptions","organizations_url":"https://api.github.com/users/StephaneDelcroix/orgs","repos_url":"https://api.github.com/users/StephaneDelcroix/repos","events_url":"https://api.github.com/users/StephaneDelcroix/events{/privacy}","received_events_url":"https://api.github.com/users/StephaneDelcroix/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2019-05-14T22:30:59Z","updated_at":"2019-08-06T08:07:59Z","closed_at":"2019-08-06T08:07:59Z","author_association":"NONE","body":"### Description\r\n\r\nI have a `Page` with a `StackLayout` using `BindableLayout.ItemsSource`, inside each item I have a `ListView`, for each item in this nested `ListView` I need to do a `Binding` to a property on the Page's ViewModel. I'm trying to use the [Source+Path](https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/data-binding/binding-path) approach but the app crashes as soon as I open the page that contains this structure.\r\n\r\n**MainPage.xaml**:\r\n```xaml\r\n<?xml version=\"1.0\" encoding=\"utf-8\" ?>\r\n<ContentPage\r\n  x:Class=\"BindableLayoutReferenceBug.ListViewPage\"\r\n  xmlns=\"http://xamarin.com/schemas/2014/forms\"\r\n  xmlns:x=\"http://schemas.microsoft.com/winfx/2009/xaml\"\r\n  xmlns:local=\"clr-namespace:BindableLayoutReferenceBug\">\r\n  <StackLayout BindableLayout.ItemsSource=\"{Binding Items}\">\r\n    <BindableLayout.ItemTemplate>\r\n      <DataTemplate>\r\n        <local:MessageListViewTemplate />\r\n      </DataTemplate>\r\n    </BindableLayout.ItemTemplate>\r\n  </StackLayout>\r\n</ContentPage>\r\n```\r\n\r\n**MessageListViewTemplate.xaml**:\r\n```xaml\r\n<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\r\n<ContentView\r\n  x:Class=\"BindableLayoutReferenceBug.MessageListViewTemplate\"\r\n  xmlns=\"http://xamarin.com/schemas/2014/forms\"\r\n  xmlns:x=\"http://schemas.microsoft.com/winfx/2009/xaml\"\r\n  x:Name=\"listView\">\r\n  <ListView ItemsSource=\"{Binding Options}\">\r\n    <ListView.ItemTemplate>\r\n      <DataTemplate>\r\n        <ViewCell>\r\n        <StackLayout>\r\n          <Label Text=\"{Binding .}\" />\r\n          <Button\r\n            BackgroundColor=\"Blue\"\r\n            Command=\"{Binding Source={x:Reference Name=listView}, Path=Parent.BindingContext.ShowMessageCommand}\"\r\n            CommandParameter=\"{Binding .}\"\r\n            Text=\"Show Message\" />\r\n        </StackLayout>\r\n        </ViewCell>\r\n      </DataTemplate>\r\n    </ListView.ItemTemplate>\r\n  </ListView>\r\n</ContentView>\r\n```\r\n\r\nThe exception shows that there is a problem finding the reference to the `x:Name` I used: Can not find the object referenced by `listView`.\r\n\r\n![image](https://user-images.githubusercontent.com/954102/57736346-f7afe480-767d-11e9-8b74-857ee647bccc.png)\r\n\r\nThis only happens when I have a nested structure as I mentioned (StackLayout with BindableLayout > ListView). At first I thought this was a problem only with `BindableLayout`, but my repro shows that his happens on `ListView` and `BindableLayout`\r\n\r\nI tried using different Paths for the binding, but since this is a problem parsing the XAML not finding the x:Name referenced, I don't think it even starts evaluating my Path.\r\n\r\nAs shown in this [answer](https://stackoverflow.com/a/56123573/1710624) in SO, it works with C#, so this look like a XAML bug.\r\n\r\n### Steps to Reproduce\r\n\r\n1. Clone https://github.com/akamud/BindableLayoutReferenceBug\r\n2. Run the app and click any of the buttons\r\n\r\n### Expected Behavior\r\n\r\nThe app should render a nested list with a frame that fires a command on the parent ViewModel.\r\n\r\n### Actual Behavior\r\n\r\nThe app crashes as soon as the page's XAML is parsed.\r\n\r\n### Basic Information\r\n\r\n- Version with issue: Xamarin.Forms 3.6.0.293080 \r\n- Platform Target Frameworks: <!-- All that apply -->\r\n  - iOS: 12.2\r\n  - Android: 9.0\r\n\r\n### Reproduction Link\r\n\r\nhttps://github.com/akamud/BindableLayoutReferenceBug"}}
other: {"actor":{"display_login":"StephaneDelcroix"}}