MvvmCross plugin for interacting with the user from a view model. ##Features
##Usage ####Alert Async
public ICommand SubmitCommand
{
get
{
return new MvxCommand(async () =>
{
if (string.IsNullOrEmpty(FirstName))
{
await Mvx.Resolve<IUserInteraction>().AlertAsync("First Name is Required");
return;
}
//do work
});
}
}
####Alert callback
public ICommand SubmitCommand
{
get
{
return new MvxCommand(() =>
{
if (string.IsNullOrEmpty(FirstName))
{
Mvx.Resolve<IUserInteraction>().Alert("First Name is Required");
return;
}
//do work
});
}
}
####Confirm/Input Async
public ICommand SubmitCommand
{
get
{
return new MvxCommand(async () =>
{
if (await Mvx.Resolve<IUserInteraction>().ConfirmAsync("Are you sure?"))
{
//do work
}
});
}
}
####Confirm/Input callback
public ICommand SubmitCommand
{
get
{
return new MvxCommand(() =>
{
Mvx.Resolve<IUserInteraction>().Confirm("Are you sure?", async () =>
{
//Do work
});
});
}
}
##Adding to your project
I will be working on a nuget package as time permits.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4