Button

Inheritance: Element -> NavigableElement -> VisualElement -> View Xamarin.Forms documentation: Button API / Guide

For details on how the control actually works, please refer to the Xamarin.Forms documentation.

Constructors

Properties

Events

Usages

Button("Press me!", ClickMsg)
    .textColor(light = Color.Red.ToFabColor(), dark = Color.Blue.ToFabColor())
    .textTransform(TextTransform.Lowercase)
    .cornerRadius(10)
    .borderColor(light = Color.Red.ToFabColor(), dark = Color.Blue.ToFabColor())
    .borderWidth(2.)
    .padding(10.)
    .characterSpacing(1.)
    .contentLayout(ImagePosition.Left, 10.)
    .image(light = "icon.png", dark = "icon.png")
    .font(namedSize = NamedSize.Large, fontFamily = "Arial", attributes = FontAttributes.Bold)
    .onPressed(PressedMsg)
    .onReleased(ReleasedMsg)

Get access to the underlying Xamarin.Forms.Button

let buttonRef = ViewRef<Button>()

Button("Press me!", ClickMsg)
    .reference(buttonRef)

Last updated