简体   繁体   中英

Mvvm Cross Xamarin.iOS - How can I bind an alert action to the ViewModel?

I am working on a Xamarin.iOS project with a ViewController that requires an alert to display along with confirm and cancel actions. If the confirm action is clicked a segue to another view should trigger while clicking cancel closes the alert and allows the user to remain on the current view. Unfortunately I have not been able to find any examples or documentation about how to achieve this with Mvvm cross's ViewModel to ViewModel navigation pattern.

Any help is greatly appreciated.

You could try to use ACR User Dialogs library. It has the most common popup solutions included, such as confirmation prompts, alerts, action sheets, eg

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM