Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.
This repository was archived by the owner on May 1, 2024. It is now read-only.

[F100] Floating Action Buttons #1714

@samhouts

Description

@samhouts

Rationale

A floating action button menu is a common design paradigm. There is currently no control in Xamarin.Forms that will provide this functionality on all platforms.

Implementation

Add new control FloatingActionButton:

public static readonly BindableProperty ColorProperty = BindableProperty.Create("Color", typeof(Color), typeof(FloatingActionButton), Color.Default);

public static readonly BindableProperty ImageSourceProperty = BindableProperty.Create("ImageSource", typeof(ImageSource), typeof(FloatingActionButton), null);

public static readonly BindableProperty CommandProperty = BindableProperty.Create("Command", typeof(ICommand), typeof(FloatingActionButton), null);

public static readonly BindableProperty CommandParamenterProperty = BindableProperty.Create("CommandParameter", typeof(object), typeof(FloatingActionButton), null);

public static readonly BindableProperty SizeProperty = BindableProperty.Create("Size", typeof(FloatingActionButtonSize), typeof(FloatingActionButton), FloatingActionButtonSize.Normal);

public event EventHandler Clicked;

public enum FloatingActionButtonSize
{
    Normal,
    Mini
}

Renderers will need to be created accordingly.

Expected Result

Android

  • Use the platform's built-in FloatingActionButton control.

iOS

  • Create custom button.

UWP

  • Create custom button.

Implications for CSS

FloatingActionButton will support color.

Backward Compatibility

Since we are adding a new control, there should be no compatibility problems at all.

Difficulty : High

This is a brand new control with commands and events, and there is no corresponding platform control for UWP or iOS. Consistency and stability will be very important.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions