{"action":"opened","issue":{"url":"https://api.github.com/repos/fsprojects/FsXaml/issues/38","repository_url":"https://api.github.com/repos/fsprojects/FsXaml","labels_url":"https://api.github.com/repos/fsprojects/FsXaml/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/fsprojects/FsXaml/issues/38/comments","events_url":"https://api.github.com/repos/fsprojects/FsXaml/issues/38/events","html_url":"https://github.com/fsprojects/FsXaml/issues/38","id":155213254,"number":38,"title":"UserControl data binding regression in 2.0.0","user":{"login":"mbergin","id":983361,"avatar_url":"https://avatars.githubusercontent.com/u/983361?v=3","gravatar_id":"","url":"https://api.github.com/users/mbergin","html_url":"https://github.com/mbergin","followers_url":"https://api.github.com/users/mbergin/followers","following_url":"https://api.github.com/users/mbergin/following{/other_user}","gists_url":"https://api.github.com/users/mbergin/gists{/gist_id}","starred_url":"https://api.github.com/users/mbergin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbergin/subscriptions","organizations_url":"https://api.github.com/users/mbergin/orgs","repos_url":"https://api.github.com/users/mbergin/repos","events_url":"https://api.github.com/users/mbergin/events{/privacy}","received_events_url":"https://api.github.com/users/mbergin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-17T09:22:28Z","updated_at":"2016-05-17T09:22:28Z","closed_at":null,"body":"### Description\r\n\r\nBinding the DataContext of a UserControl using an ElementName binding worked in 0.9.9, does not work in 2.0.0\r\n\r\n### Repro steps\r\n\r\n#### MainWindow.xaml\r\n```\r\n<Window\r\n    xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\r\n    xmlns:local=\"clr-namespace:ViewModels;assembly=FsEmptyWindowsApp1\">\r\n    <StackPanel>\r\n        <TextBox Name=\"Foo\"/>\r\n        <local:TestControl DataContext=\"{Binding ElementName=Foo, Path=Text}\"/>\r\n    </StackPanel>\r\n</Window>\r\n```\r\n\r\n#### TestControl.xaml\r\n\r\n```\r\n<UserControl xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\">\r\n    <TextBox Text=\"{Binding .}\"/>\r\n</UserControl>\r\n```\r\n\r\n### Expected behavior\r\n\r\nTyping into the TextBox Foo results in the same text in the TestControl.\r\n\r\n### Actual behavior\r\n\r\nTestControl is blank. Binding error in Debug Output is \r\n> System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=Foo'. BindingExpression:Path=Text; DataItem=null; target element is 'TestControl' (Name=''); target property is 'DataContext' (type 'Object')\r\n\r\n### Known workarounds\r\n\r\nNone.\r\n\r\n### Related information \r\n\r\n* Windows 8.1\r\n* FsXaml 2.0.0 via nuget\r\n* .NET 4.5"}}