Fabulous does not natively let us extend an element with Xamarin.Forms.Behaviors.
The only way, today, is to get access to the underlying Xamarin.Forms control through created and set the behavior directly there.
It would be nice to have a better integration for this.
type EntryBehavior() =
inherit Xamarin.Forms.Behavior()
(...)
type View with
static member EntryBehavior() =
let create () = new EntryBehavior()
(...)
View.Entry(
text = entryText,
behaviors = [
View.EntryBehavior() // behavior used here
]
)
Fabulous does not natively let us extend an element with
Xamarin.Forms.Behavior
s. The only way, today, is to get access to the underlying Xamarin.Forms control throughcreated
and set the behavior directly there.It would be nice to have a better integration for this.
Use case
See https://github.com/fsprojects/Fabulous/issues/827#issuecomment-752080906 for an example.
Proposal