Sounds like you need this:
System.Windows.Input.CommandManager.InvalidateRequerySuggested(); When your significant event happens, call this to requery your command bindings. Carl. Carl Scarlett Senior .NET/WPF Developer, UX Designer | Genesis IT & Change Management | Bankwest A: Level 5, 199 Hay Street | Perth | Western Australia | 6004 P: (08) 9449 8451 M: 0408 913 870 E: [email protected] Description: test From: [email protected] [mailto:[email protected]] On Behalf Of Greg Keogh <[email protected]> Sent: Tuesday, 11 October 2011 3:25 PM To: "'ozWPF'" <[email protected]> Subject: Waking up commands Folks, I have menus and toolbar buttons wired up to commands in the simple textbook way. For example, I click the 'Login' command and my app obeys and then I update some binding properties and I can see bound text messages changing in response. However, the menu and toolbar buttons are not bound to anything, they just use the command infrastructure (CanExecute and Execute) and they don't respond and change enable state. If I click a button or drop a menu down then they "wake up" and respond and update correctly. Is there a way of "waking up" these commands and forcing them to update their state when something else important happens in the app? Is it a design fault or am I missing something? Greg ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ _______________________________________________ ozwpf mailing list [email protected] http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf ________________________________________________________________________ _______ This email has been scanned by the Bankwest Email Security System. ________________________________________________________________________ _______ _______________________________________________________________________________ Unencrypted electronic mail is not secure and may not be authentic. If you have any doubts as to the contents please telephone to confirm. This electronic transmission including any attachments is intended only for those to whom it is addressed. It may contain copyright material or information that is confidential, privileged or exempt from disclosure by law. Any claim to privilege is not waived or lost by reason of mistaken transmission of this information. If you are not the intended recipient you must not distribute or copy this transmission and should please notify the sender. Your costs for doing this will be reimbursed by the sender. We do not accept liability in connection with computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment. _______________________________________________________________________________ ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________
<<inline: image001.png>>
_______________________________________________ ozwpf mailing list [email protected] http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf
