There are a few answers around to this on StackOverflow - e.g. using an interaction helper or using a dialog service
However, for simple message boxes or for a simple message prompt, BrianChance has provided this open source plugin - https://github.com/brianchance/MvvmCross-UserInteraction
So now showing a message is as easy as:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mvx.Resolve<IUserInteraction>() | |
. Confirm("Do you want to delete?", result => { | |
if (result) | |
// do deletion | |
}); |
This is awesome - and it happily earns Brian badge #2 - thanks Brian!
No comments:
Post a Comment