Pop-ups
type Msg =
| DisplayAlert
| AlertResult of bool
let update (msg : Msg) (model : Model) =
match msg with
| DisplayAlert ->
let alertResult = async {
let! alert =
Application.Current.MainPage.DisplayAlert("Display Alert", "Confirm", "Ok", "Cancel")
|> Async.AwaitTask
return AlertResult alert }
model, Cmd.ofAsyncMsg alertResult
| AlertResult alertResult -> ... // Do something with the result
Last updated