Skip to content

Tile

The Tile allows you to make highly stylized buttons through a highly customizable control. By using this control, you can create buttons with a variety of colors, fonts, shapes, sizes and images.

Tile

Properties

EmbeddedImageName - string

Gets or sets the name of the embedded image. Default value is null.

MaxImageSize - Size

Gets or sets maximum size of the embedded image. Default is -1d.

OverlayColor - Color

Gets or sets the color of the overlay. Default value is Xamarin.Forms.Color.Transparent.

ButtonBackgroundColor - Color

Gets or sets the color of the button background. Default value is Xamarin.Forms.Color.Default.

BorderColor - Color

Gets or sets the color of the border. Default value is Xamarin.Forms.Color.Default.

ShadowColor - Color

Gets or sets the color of the shadow. Default value is Xamarin.Forms.Color.FromRgba(0d, 0d, 0d, .33d).

ShadowLocation - Point

Gets or sets the shadow location. Default value is Point(0, 3).

ShadowBlurRadius - double

Gets or sets the shadow blur radius.

BorderWidth - double

Gets or sets the width of the border. Default value is 0d.

CornerRadius - double

Gets or sets the corner radius. Default value is 4d.

Text - string

Gets or sets the text.

TextAlignment - TextAlignment

Gets or sets the text alignment. Default is Center.

FontColor - Color

Gets or sets the color of the font. Default value is Xamarin.Forms.Color.White.

FontSize - double

Gets or sets the size of the font.

Typeface - SKTypeface

Gets or sets the typeface.

Ripples - bool

Gets or sets a value indicating whether the tile has a ripple effect when touched.

TapAnimationDuration - uint

Gets or sets the duration of the animation when tile is tapped. Default is 40u.

Command - ICommand

Gets or sets the command.

CommandParameter - object

Gets or sets the command parameter.

Example Usage

Xaml

<aurora:Tile x:Name="tile2" CornerRadius="2" ShadowLocation="0, 8" ShadowBlurRadius="4" TapAnimationDuration="600" ContentPadding="8" OverlayColor="White" Text="XAMARIN" ButtonBackgroundColor="Maroon" EmbeddedImageName="xamarin.svg" />

C#

var tile = new Tile
    {
        EmbeddedImageName = "xamarin.svg",
        Text = "Xamarin",
        FontColor = Color.Chocolate,
        BorderWidth = 3,
        TextAlignment = Aurora.TextAlignment.Center,
        CornerRadius = 6
    };