I have started writing my own custom Command classes by implementing the ICommand interface.
So far, it works like a charm when I bind them to Buttons.
It's a good thing to let the CommandManager do the work of checking each of my command predicates to toggle a button's visibility, but, what if I want to toggle a whole UI region (like a GroupBox) depending on specific conditions ?
A clear example is a GroupBox with a ProgressBar which Visibility is "Collapsed" by default and that I want to be Visible only when the user has completed the minimum requirements on the View.
Acutally, I have written a ICommand that verifies if the user has entered all the minimum requirements (selecting at least an item in each of the three ListBox and has entered a valid path in a Textbox. I have bound that ICommand to a Button (which
I have called ExportButton). So, when all the requirements have been approved by the ICommand, the Button's visibility toggles to Visible and the user can "Export".
My question is : How can I toggle the "Exportation GroupBox"'s Visibility (the GroupBox that contains the ProgressBar) from "Collapsed" to "Visible" when the user has clicked the Export Button ?
Of course I could just do it from the Button's Click event in code-behind. In respect to MVVM, I'd like to keep my codebehind file as clea
View Complete Post