Animations
let animatedLabelRef = ViewRef<Label>()
let view dispatch model =
View.Label(text="Rotate", ref=animatedLabelRef) let mutable label = None
View.Label(text="hello", created=(fun l -> label <- Some l))Animations
let animatedLabelRef = ViewRef<Label>()
let update msg model =
match msg with
| Poked ->
match animatedLabelRef.TryValue with
| None -> ()
| Some c -> c.RotateTo (360.0, 2000u) |> ignore
let view dispatch model =
View.StackLayout [
View.Label(text="Rotate", ref=animatedLabelRef)
View.Button(text="Rotate", command=(fun () -> dispatch Poked))
]Last updated