{"action":"opened","issue":{"url":"https://api.github.com/repos/lbugnion/mvvmlight/issues/36","repository_url":"https://api.github.com/repos/lbugnion/mvvmlight","labels_url":"https://api.github.com/repos/lbugnion/mvvmlight/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/lbugnion/mvvmlight/issues/36/comments","events_url":"https://api.github.com/repos/lbugnion/mvvmlight/issues/36/events","html_url":"https://github.com/lbugnion/mvvmlight/issues/36","id":334508804,"node_id":"MDU6SXNzdWUzMzQ1MDg4MDQ=","number":36,"title":"Problem with ListView binding","user":{"login":"sonnenschein123","id":19288720,"node_id":"MDQ6VXNlcjE5Mjg4NzIw","avatar_url":"https://avatars3.githubusercontent.com/u/19288720?v=4","gravatar_id":"","url":"https://api.github.com/users/sonnenschein123","html_url":"https://github.com/sonnenschein123","followers_url":"https://api.github.com/users/sonnenschein123/followers","following_url":"https://api.github.com/users/sonnenschein123/following{/other_user}","gists_url":"https://api.github.com/users/sonnenschein123/gists{/gist_id}","starred_url":"https://api.github.com/users/sonnenschein123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonnenschein123/subscriptions","organizations_url":"https://api.github.com/users/sonnenschein123/orgs","repos_url":"https://api.github.com/users/sonnenschein123/repos","events_url":"https://api.github.com/users/sonnenschein123/events{/privacy}","received_events_url":"https://api.github.com/users/sonnenschein123/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-21T14:02:40Z","updated_at":"2018-06-21T14:02:40Z","closed_at":null,"author_association":"NONE","body":"Hello, \r\n\r\nI write a tool with mvvm light, my MainForm xaml code contains a ListView like this:\r\n\r\n    <ListView AlternationCount=\"2\" ScrollViewer.CanContentScroll=\"True\" ScrollViewer.HorizontalScrollBarVisibility=\"Auto\" ItemsSource=\"{Binding SQLVersionenView, Mode=TwoWay}\" MinHeight=\"25\" Grid.ColumnSpan=\"2\" Grid.Row=\"1\">\r\n        <ListView.View>\r\n            <GridView>\r\n                <GridViewColumn Header=\"State\">\r\n                    <GridViewColumn.CellTemplate>\r\n                        <DataTemplate>\r\n                            <CheckBox IsChecked=\"{Binding import, Mode=TwoWay}\"/>\r\n                        </DataTemplate>\r\n                    </GridViewColumn.CellTemplate>\r\n                </GridViewColumn>\r\n                <GridViewColumn Header=\"Version\" DisplayMemberBinding=\"{Binding SQL_VERSION}\"/>\r\n                <GridViewColumn Header=\"comment\" DisplayMemberBinding=\"{Binding COMMENT}\"/>\r\n                <GridViewColumn Header=\"path\" DisplayMemberBinding=\"{Binding sql_path}\"/>\r\n            </GridView>\r\n        </ListView.View>\r\n    </ListView>\r\n\r\nThe binding works pretty well, but I implemented a *select all* function and this don’t do anything \r\n\r\n    private void selectAllPretty() {\r\n        foreach (SQLVersionInfo tmpSQLVersionInfo in SQLVersionenView) {\r\n            tmpSQLVersionInfo.import = true; // Just update the value\r\n        }\r\n    }\r\n\r\nSo I tried a little bit and found a way to get the job done: \r\n\r\n    private void selectAllUgly() {\r\n        List<SQLVersionInfo> tmpSQLVersionenView = new List<SQLVersionInfo>(); // Create new list\r\n        foreach (SQLVersionInfo tmpSQLVersionInfo in SQLVersionenView) {\r\n            tmpSQLVersionInfo.import = true;\r\n            tmpSQLVersionenView.Add(tmpSQLVersionInfo); // Fill the new list\r\n        }\r\n        SQLVersionenView = tmpSQLVersionenView; // Update the actual list\r\n    }\r\n\r\nSo my question is, is there a third way? What have I done wrong? \r\n\r\nBest,\r\nsonnenschein123"}}
{"actor":{"display_login":"sonnenschein123"}}