Hi
I have a simple WPF with a menu, a toolbar and a ListView in a GridView. the menu and toolbar actions are bound to commands.
I have that defines when commands should be executed ("CanExecute"). Some commands, such as "Create New Item" should always be executed, so they are bound to a "e.CanExecute = true;
" function.
However, when the user selects all items in the list using Ctrl-A, and then press Delete, my application runs a BackgroundWorker that deletes the items from the server and then sets the ItemsSource of the list view to the new data collection, which is empty.
This sometimes causes all commands in the menu and toolbar to be disabled. Note that their keyboard shortcuts still work, but the actions are disabled in the menu and toolbar.
This doesn't always happen, and I failed to find a rule to when it does happen.
Did anyone run into a similar behavior or has any idea what might cause it?
Thanks, Shmulik