{"action":"created","issue":{"url":"https://api.github.com/repos/EmptyKeys/UI_Framework/issues/7","repository_url":"https://api.github.com/repos/EmptyKeys/UI_Framework","labels_url":"https://api.github.com/repos/EmptyKeys/UI_Framework/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/EmptyKeys/UI_Framework/issues/7/comments","events_url":"https://api.github.com/repos/EmptyKeys/UI_Framework/issues/7/events","html_url":"https://github.com/EmptyKeys/UI_Framework/issues/7","id":391478190,"node_id":"MDU6SXNzdWUzOTE0NzgxOTA=","number":7,"title":"DataContext with Anonymous Type","user":{"login":"Wompuz","id":3235258,"node_id":"MDQ6VXNlcjMyMzUyNTg=","avatar_url":"https://avatars1.githubusercontent.com/u/3235258?v=4","gravatar_id":"","url":"https://api.github.com/users/Wompuz","html_url":"https://github.com/Wompuz","followers_url":"https://api.github.com/users/Wompuz/followers","following_url":"https://api.github.com/users/Wompuz/following{/other_user}","gists_url":"https://api.github.com/users/Wompuz/gists{/gist_id}","starred_url":"https://api.github.com/users/Wompuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wompuz/subscriptions","organizations_url":"https://api.github.com/users/Wompuz/orgs","repos_url":"https://api.github.com/users/Wompuz/repos","events_url":"https://api.github.com/users/Wompuz/events{/privacy}","received_events_url":"https://api.github.com/users/Wompuz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-12-16T15:34:04Z","updated_at":"2018-12-18T14:51:15Z","closed_at":null,"author_association":"NONE","body":"When I'm using a DataContext with Anonymous Type like so\r\n\r\n`DataContext = new { login = BuildLoginUIModel(), options = BuildOptionsUIModel() }`\r\n\r\nThe bindings in the UI don't get updated. The PropertyChanged event seems to be called but it doesn't update the property in the UI. Also ICommands that are set on buttons don't work. I've also tried to apply this in the sample by setting this in the Game1.cs file:\r\n\r\n`basicUI.DataContext = new { test1 = viewModel };`\r\n\r\nAnd appending the test1 at all bindings like so:\r\n\r\n```\r\n<Button Name=\"button1\" Grid.Row=\"0\" Grid.Column=\"1\" Content=\"Button 1\" Width=\"200\" Height=\"30\" Margin=\"5\" HorizontalAlignment=\"Left\"\r\n                            Command=\"{Binding test1.ButtonCommand}\" CommandParameter=\"Click Button 1\" TabIndex=\"1\">\r\n```\r\n\r\nAnd it seems to break all bindings. Is anonymous type with DataContext supported?\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/EmptyKeys/UI_Framework/issues/comments/448246252","html_url":"https://github.com/EmptyKeys/UI_Framework/issues/7#issuecomment-448246252","issue_url":"https://api.github.com/repos/EmptyKeys/UI_Framework/issues/7","id":448246252,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0ODI0NjI1Mg==","user":{"login":"EmptyKeys","id":7707327,"node_id":"MDQ6VXNlcjc3MDczMjc=","avatar_url":"https://avatars2.githubusercontent.com/u/7707327?v=4","gravatar_id":"","url":"https://api.github.com/users/EmptyKeys","html_url":"https://github.com/EmptyKeys","followers_url":"https://api.github.com/users/EmptyKeys/followers","following_url":"https://api.github.com/users/EmptyKeys/following{/other_user}","gists_url":"https://api.github.com/users/EmptyKeys/gists{/gist_id}","starred_url":"https://api.github.com/users/EmptyKeys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EmptyKeys/subscriptions","organizations_url":"https://api.github.com/users/EmptyKeys/orgs","repos_url":"https://api.github.com/users/EmptyKeys/repos","events_url":"https://api.github.com/users/EmptyKeys/events{/privacy}","received_events_url":"https://api.github.com/users/EmptyKeys/received_events","type":"User","site_admin":false},"created_at":"2018-12-18T14:51:15Z","updated_at":"2018-12-18T14:51:15Z","author_association":"OWNER","body":"Hmm i never tried that and i would not recommend it. Having specific class (and type) for View Model is better. You can avoid using reflection in UI and you can test it properly."}}
{"actor":{"display_login":"EmptyKeys"}}