Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COThanks for the answer. Could you clarify the below scenario please. Say you display a view model in the DialogWindow with Save and Cancel commands. When the user clicks Save on the view (bound to the SaveCommand) you would want to maybe run some validation and save the configuration, only if this is successful would the dialog close. I can't seem to get my head around how the VM would set the DialogResult of the view (therefore closing the dialog). Thanks again.
      singulars
    2. COThere are many ways of getting the VM to interact with the view without breaking the abstraction. For instance, the dialog view model base class typically has some base properties and methods to make showing dialogs a little easier (I typically have a interface for a dialog viewmodel that includes things like a method that is meant to run on view load, as well as the dialog result, commit/abort commands, etc). An easy way to get the viewmodel to tell the view to close is to expose a property (CanClose for instance).
      singulars
    3. COThen create a corresponding dependency property on your dialog, and when the datacontext changes set a binding between the two - that way you can handle any logic in your bound property's changed event handler. Then again, it's even easier to simply expose a "close" event on your dialog viewmodel, and in the dialog window data context changed handler subscribe to this event, the handler can assign appropriate dialog result and close the window.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload