Skip to content

Float Label Numeric Entry Control

The Float Label Numeric Entry Control is very similar to the Numeric Entry Control in that it let's the developer implement text boxes for formatted numbers based on localization and other scenarios. But it has the added benefit of having a constantly visible label that 'floats' above the control during entry.

FloatLabelNumericEntry

Properties

Text - string

Gets or sets the entry control's text.

PrefixValue - string

Gets or sets the prefix value. This is the prefix for a currency or other specialized number; for example, $.

MaxValue - double

Gets or sets the maximum value. Default is double.MaxValue

MinValue - double

Gets or sets the minimum value. Default is double.MinValue.

Value - double

Gets or sets the value. Default is 0d.

Format - string

Gets or sets the format. Default is "0.##".

MaxDecimalPlaces - int

Gets or sets the max decimal places. Default value is 2.

EditingView - View

Gets or sets the editing view.

EditingViewHeight - GridLength

Gets or sets the height of the editing view. Default value is GridLength.Star.

ActiveColor - Color

Gets or sets the color of the active control. Default value is Xamarin.Forms.Color.Black.

InactiveColor - Color

Gets or sets the color of the inactive control. Default value is Xamarin.Forms.Color.DimGray.

Disabled - bool

Gets or sets a value indicating whether or not the control is disabled.

DisabledColor - Color

Gets or sets the color of the control when it is disabled.

ErrorColor - Color

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

ErrorText - string

Gets or sets the error text.

ContentBackgroundColor - Color

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

Placeholder - string

Gets or sets the placeholder.

PlaceholderColor - Color

Gets or sets the color of the placeholder. Default is the default OS color.

BorderSize - double

Gets or sets the size of the border. Default value is 1d.

BorderStyle - FloatingLabelContainerBorderStyle

Gets or sets the border style. Can be set to one of the following styles:

public enum FloatingLabelContainerBorderStyle {
    Underline,
    RoundedUnderline,
    Rectangle,
    RoundedRectangle
}

EditingViewMargin - Thickness

Gets or sets the border control margin. Default value is 2d.

CornerRadius - double

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

TitleRowHeight - GridLength

Gets or sets the height of the title row. Default value is GridLength.Auto.

ErrorRowHeight - GridLength

Specifies the height of the error row where the provided error text will display. Default value is GridLength.Auto.

TitleFontSize - double

Gets or sets the size of the title font. Default is 11.

ErrorFontSize - double

Gets or sets the size of the error font. Default is 11.

AlwaysShowTitle - bool

Gets or sets a value indicating whether the control always shows the title.

UserEditable - bool

Gets or sets a value indicating whether the control is user editable.

Command - ICommand

Gets or sets the command. Default value is default(System.Windows.Input.ICommand).

CommandParameter - object

Gets or sets the command parameter.

FocusAnimationLength - uint

Gets or sets the length of the focus animation. Default is 250u.

HasValue - bool

Gets or sets a value indicating whether this control has a value.

FontAttributes - FontAttributes

Gets or sets the font attributes. Default value is FontAttributes.None.

FontSize - double

Gets or sets the font size. Default value is Services.PlatformInfo.DefaultButtonFontSize.

FontFamily - string

Gets or sets the font family. Default value is Font.Default.FontFamily.

TextColor - Color

Gets or sets the text color. Default value is Black.

Example Usage

Xaml

<aurora:FloatLabelNumericEntry x:Name="updatedNumericEntry" Placeholder="Updated Currency Entry" PrefixValue="$" MaxValue="999.99" />

C#

var entry = new FloatLabelNumericEntry
    {
        PrefixValue = "#",
        Placeholder = "Type here!",
        MaxValue = 150.00,
        PlaceholderColor = Color.Violet
    };