{"action":"created","issue":{"url":"https://api.github.com/repos/MvvmCross/MvvmCross/issues/2653","repository_url":"https://api.github.com/repos/MvvmCross/MvvmCross","labels_url":"https://api.github.com/repos/MvvmCross/MvvmCross/issues/2653/labels{/name}","comments_url":"https://api.github.com/repos/MvvmCross/MvvmCross/issues/2653/comments","events_url":"https://api.github.com/repos/MvvmCross/MvvmCross/issues/2653/events","html_url":"https://github.com/MvvmCross/MvvmCross/issues/2653","id":302079546,"number":2653,"title":"Generic UWP views break compiled bindings","user":{"login":"albertofustinoni","id":3510093,"avatar_url":"https://avatars1.githubusercontent.com/u/3510093?v=4","gravatar_id":"","url":"https://api.github.com/users/albertofustinoni","html_url":"https://github.com/albertofustinoni","followers_url":"https://api.github.com/users/albertofustinoni/followers","following_url":"https://api.github.com/users/albertofustinoni/following{/other_user}","gists_url":"https://api.github.com/users/albertofustinoni/gists{/gist_id}","starred_url":"https://api.github.com/users/albertofustinoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albertofustinoni/subscriptions","organizations_url":"https://api.github.com/users/albertofustinoni/orgs","repos_url":"https://api.github.com/users/albertofustinoni/repos","events_url":"https://api.github.com/users/albertofustinoni/events{/privacy}","received_events_url":"https://api.github.com/users/albertofustinoni/received_events","type":"User","site_admin":false},"labels":[{"id":20868889,"url":"https://api.github.com/repos/MvvmCross/MvvmCross/labels/Needs%20investigation","name":"Needs investigation","color":"DDDDDD","default":false},{"id":501339009,"url":"https://api.github.com/repos/MvvmCross/MvvmCross/labels/UWP","name":"UWP","color":"0e8a16","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-03-04T11:54:32Z","updated_at":"2018-04-14T01:25:04Z","closed_at":"2018-04-14T01:25:04Z","author_association":"NONE","body":"### Steps to reproduce :scroll:\r\n\r\n1. Follow instructions in [Pages abstraction and ViewModel binding](https://www.mvvmcross.com/documentation/platform/universal-windows-platform-uwp/universal-windows-platform-uwp?scroll=456#pages-abstraction-and-viewmodel-binding) to create views with typed viewmodels (instances of `MvxWindowsPage<TViewModel>`)\r\n\r\n2. In the page XAML try to use compiled bindings (`x:bind` syntax)\r\n\r\n3. Project does not compile\r\n\r\n4. Use non generic views (`MvxWindowsPage` instances) and create a property to expose the viewmodel manually. For example:\r\n\r\n```\r\nclass MyPage : MvxWindowsPage\r\n{\r\n TViewModel VM => ViewModel as TViewModel;\r\n}\r\n```\r\n\r\nand use x:bind on that property\r\n\r\n5. Project compiles.\r\nSeems like the XAML compiler doesn't like the way the ViewModel property is hidden in generic `MvxWindowsPage<T>`\r\n\r\n### Expected behavior :thinking:\r\nProject compiles successfully\r\n\r\n### Actual behavior :bug:\r\nBuild fails with\r\n`Microsoft.Windows.UI.Xaml.Common.targets(351,5): Xaml Internal Error error WMC9999: Object reference not set to an instance of an object.`\r\n\r\n### Configuration :wrench:\r\n\r\n**Version:** 5.6.3\r\n**Platform:** \r\n- [ ] :iphone: iOS\r\n- [ ] :robot: Android\r\n- [ ] :checkered_flag: WPF\r\n- [x] :earth_americas: UWP\r\n- [ ] :apple: MacOS\r\n- [ ] :tv: tvOS\r\n- [ ] :monkey: Xamarin.Forms\r\n"},"comment":{"url":"https://api.github.com/repos/MvvmCross/MvvmCross/issues/comments/381293934","html_url":"https://github.com/MvvmCross/MvvmCross/issues/2653#issuecomment-381293934","issue_url":"https://api.github.com/repos/MvvmCross/MvvmCross/issues/2653","id":381293934,"user":{"login":"nickrandolph","id":1614057,"avatar_url":"https://avatars2.githubusercontent.com/u/1614057?v=4","gravatar_id":"","url":"https://api.github.com/users/nickrandolph","html_url":"https://github.com/nickrandolph","followers_url":"https://api.github.com/users/nickrandolph/followers","following_url":"https://api.github.com/users/nickrandolph/following{/other_user}","gists_url":"https://api.github.com/users/nickrandolph/gists{/gist_id}","starred_url":"https://api.github.com/users/nickrandolph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickrandolph/subscriptions","organizations_url":"https://api.github.com/users/nickrandolph/orgs","repos_url":"https://api.github.com/users/nickrandolph/repos","events_url":"https://api.github.com/users/nickrandolph/events{/privacy}","received_events_url":"https://api.github.com/users/nickrandolph/received_events","type":"User","site_admin":false},"created_at":"2018-04-14T01:25:04Z","updated_at":"2018-04-14T01:25:04Z","author_association":"CONTRIBUTOR","body":"@albertofustinoni I'm going to close this issue - the work around it to just not use generics and there's not much we can do about the XAML compiler"}}
{"actor":{"display_login":"nickrandolph"}}