{"action":"created","issue":{"url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/2574","repository_url":"https://api.github.com/repos/xamarin/Xamarin.Forms","labels_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/2574/labels{/name}","comments_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/2574/comments","events_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/2574/events","html_url":"https://github.com/xamarin/Xamarin.Forms/issues/2574","id":319260656,"number":2574,"title":"Code-behind x:Name not linking properly","user":{"login":"jhumphrey1","id":19778665,"avatar_url":"https://avatars0.githubusercontent.com/u/19778665?v=4","gravatar_id":"","url":"https://api.github.com/users/jhumphrey1","html_url":"https://github.com/jhumphrey1","followers_url":"https://api.github.com/users/jhumphrey1/followers","following_url":"https://api.github.com/users/jhumphrey1/following{/other_user}","gists_url":"https://api.github.com/users/jhumphrey1/gists{/gist_id}","starred_url":"https://api.github.com/users/jhumphrey1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhumphrey1/subscriptions","organizations_url":"https://api.github.com/users/jhumphrey1/orgs","repos_url":"https://api.github.com/users/jhumphrey1/repos","events_url":"https://api.github.com/users/jhumphrey1/events{/privacy}","received_events_url":"https://api.github.com/users/jhumphrey1/received_events","type":"User","site_admin":false},"labels":[{"id":772612655,"url":"https://api.github.com/repos/xamarin/Xamarin.Forms/labels/a/Xaml","name":"a/Xaml","color":"dfe271","default":false},{"id":343860851,"url":"https://api.github.com/repos/xamarin/Xamarin.Forms/labels/t/bug%20:bug:","name":"t/bug :bug:","color":"fc2929","default":false}],"state":"open","locked":false,"assignee":{"login":"StephaneDelcroix","id":313003,"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,"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":1,"created_at":"2018-05-01T17:11:07Z","updated_at":"2018-05-02T13:29:23Z","closed_at":null,"author_association":"NONE","body":"<!-- Bug report best practices: https://github.com/xamarin/Xamarin.Forms/wiki/Submitting-Issues -->\r\n\r\n### Description\r\nCannot access named components from code-behind\r\n\r\n### Steps to Reproduce\r\n\r\n1. Create a new blank Xamarin Forms project\r\n2. Add 'x:Name=\"myTextLabel\" ' to the default \"Welcome to Xamarin.Forms\" label, and 'x:Name=\"myContentPage\" ' to the default ContentPage\r\n3. Try and reference them in the code-behind\r\n\r\n### Expected Behavior\r\nShould run as expected\r\n### Actual Behavior\r\nmyTextLabel gives 'Not Available' error (shown in image)\r\nmyContentPage gives standard \"myContentPage does not exist in current context\"\r\n![xamarin-error](https://user-images.githubusercontent.com/19778665/39483407-4938c3b6-4d40-11e8-8662-50961d28bf2b.png)\r\n\r\nTrying to run the code with just the myTextLabel referenced works as expected. Trying to run it with myContentPage referenced does not.\r\n\r\n### Basic Information\r\n\r\n- Version with issue:\r\n- Last known good version: N/A\r\n- IDE: Visual Studio\r\n- Platform Target Frameworks: <!-- All that apply -->\r\n  - iOS:  11.3\r\n  - Android: 8.1\r\n- Android Support Library Version: v27.0.2\r\n- Nuget Packages: Xamarin.Forms v2.5.1.444934\r\n- Affected Devices: Note 8, iPhone X\r\n\r\n### Screenshots\r\nHere is the xaml, all blocked text is the same (Namespace name)\r\n![xamarin-error-2](https://user-images.githubusercontent.com/19778665/39483606-f329aa20-4d40-11e8-8330-b5024a6bc9c6.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/comments/385977669","html_url":"https://github.com/xamarin/Xamarin.Forms/issues/2574#issuecomment-385977669","issue_url":"https://api.github.com/repos/xamarin/Xamarin.Forms/issues/2574","id":385977669,"user":{"login":"StephaneDelcroix","id":313003,"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},"created_at":"2018-05-02T13:29:23Z","updated_at":"2018-05-02T13:29:23Z","author_association":"MEMBER","body":"I'm still wondering why one needs a field to be created for a x:Name on the root 🤷‍♂️ "}}
{"actor":{"display_login":"StephaneDelcroix"}}