{"action":"created","issue":{"url":"https://api.github.com/repos/PrismLibrary/Prism/issues/58","labels_url":"https://api.github.com/repos/PrismLibrary/Prism/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/PrismLibrary/Prism/issues/58/comments","events_url":"https://api.github.com/repos/PrismLibrary/Prism/issues/58/events","html_url":"https://github.com/PrismLibrary/Prism/issues/58","id":87436738,"number":58,"title":"[Win10 UWP] Changing patterns with {x:Bind}","user":{"login":"apollyonbob","id":3664956,"avatar_url":"https://avatars.githubusercontent.com/u/3664956?v=3","gravatar_id":"","url":"https://api.github.com/users/apollyonbob","html_url":"https://github.com/apollyonbob","followers_url":"https://api.github.com/users/apollyonbob/followers","following_url":"https://api.github.com/users/apollyonbob/following{/other_user}","gists_url":"https://api.github.com/users/apollyonbob/gists{/gist_id}","starred_url":"https://api.github.com/users/apollyonbob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apollyonbob/subscriptions","organizations_url":"https://api.github.com/users/apollyonbob/orgs","repos_url":"https://api.github.com/users/apollyonbob/repos","events_url":"https://api.github.com/users/apollyonbob/events{/privacy}","received_events_url":"https://api.github.com/users/apollyonbob/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-06-11T18:17:41Z","updated_at":"2015-06-11T20:52:25Z","closed_at":"2015-06-11T18:39:40Z","body":"So {x:Bind} is changing how binding works. {Binding} connects to a context, which at a top most level is a DataContext. {x:Bind} doesn't connect to a context, it connects directly to properties on the host control, and is strongly typed. This means that {x:Bind} can't use DataContext, because DataContext is type object. \r\nAlso, as {x:Bind} has much better performance than {Binding} it should be the new default going forward.\r\n\r\nWith that context, I was just wondering how this should be handled. I mean I know in the short term one could just make a property that returns (IViewModelType)DataContext, and hope it all kind of works out haha. But in the long term, is there a plan for what the IView should look like to accommodate this?\r\n\r\nSome thoughts - you could specify the ViewModel Type you're looking for in the IView itself - IView<IViewModelType> I suppose. And IView<T> could also implement IView, so you can still do the IView checking for AutoWire?"},"comment":{"url":"https://api.github.com/repos/PrismLibrary/Prism/issues/comments/111274569","html_url":"https://github.com/PrismLibrary/Prism/issues/58#issuecomment-111274569","issue_url":"https://api.github.com/repos/PrismLibrary/Prism/issues/58","id":111274569,"user":{"login":"apollyonbob","id":3664956,"avatar_url":"https://avatars.githubusercontent.com/u/3664956?v=3","gravatar_id":"","url":"https://api.github.com/users/apollyonbob","html_url":"https://github.com/apollyonbob","followers_url":"https://api.github.com/users/apollyonbob/followers","following_url":"https://api.github.com/users/apollyonbob/following{/other_user}","gists_url":"https://api.github.com/users/apollyonbob/gists{/gist_id}","starred_url":"https://api.github.com/users/apollyonbob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apollyonbob/subscriptions","organizations_url":"https://api.github.com/users/apollyonbob/orgs","repos_url":"https://api.github.com/users/apollyonbob/repos","events_url":"https://api.github.com/users/apollyonbob/events{/privacy}","received_events_url":"https://api.github.com/users/apollyonbob/received_events","type":"User","site_admin":false},"created_at":"2015-06-11T20:52:25Z","updated_at":"2015-06-11T20:52:25Z","body":"@brianlagunas IBindable is usually used for binding targets, like ViewModels and Models, isn't it? IBindableView? IContextualView? IInjectableView? Ooh I kind of like that one. \r\n\r\n@bartlannoeye Well, when it comes to \"do you want the error at runtime\" vs \"do you want the error at compile time\" I vote for compile time every day of the week, and twice on Sunday. I mean, yes, you can't just assign any old object and hope it all works out, but I consider this a feature, myself haha. But I tend to only connect things via interfaces to keep dependency inversion, and to allow for better testing. Usually. With Views, yeah I getcha, there's not a lot of reason to keep it separate from the view model haha.\r\n\r\nBut if you just provide the interface, I mean that pretty much does the rest. If you have a IInjectableView<TVIewModel>, then when they take the interface, and implement it with the default, it should produce TViewModel ViewModel {get; set;} right?\r\n"}}