I am using a custom view presenter in my Windows Store app.
I show a SettingsFlyout and in its SettingsViewModel view-model I have a command bound to a button on the flyout which needs to hide the flyout (SettingsFlyout::Hide()).
For this, I have different options:
in the SettingsFlyout, I can handle the button click
in the ICommand in the view-model, send a message from view-model to view
in the ICommand in the view-model, call
Close(this).I was trying to implement last one, using Close(this) in the view-model.
For this, in the custom view presenter I was thinking to handle
ChangePresentation(MvxPresentationHint hint)orClose(IMvxViewModel viewModel).But I don't see how to get the view instance corresponding to the view-model instance.
In my case I have the SettingsViewModel instance and I need to get the instance of the displayed SettingsFlyout.
Is there a way?