New to Telerik UI for .NET MAUIStart a free 30-day trial

Represents a size for the bottom sheet, which can be specified as a percentage or an absolute value.

Definition

Namespace:Telerik.Maui.Controls.BottomSheet

Assembly:Telerik.Maui.Controls.dll

Syntax:

C#
[TypeConverter(typeof(BottomSheetLengthTypeConverter))]
public struct BottomSheetLength

Inherited Members ValueType.Equals(object)ValueType.GetHashCode()

Constructors

Initializes a new instance of the BottomSheetLength.

C#
public BottomSheetLength(double value, bool isPercentage = false)
Parameters:valuedouble

The size value, either as a percentage (e.g., 0.5 for 50%) or an absolute value in pixels.

isPercentagebool

Indicates whether the value is a percentage.

Fields

Represents a full bottom sheet state with height 90%.

C#
public static readonly BottomSheetLength Full

Represents a hidden bottom sheet state.

C#
public static readonly BottomSheetLength Hidden

Represents a minimal bottom sheet state with height 25%.

C#
public static readonly BottomSheetLength Minimal

Represents a partial bottom sheet state with height 50%.

C#
public static readonly BottomSheetLength Partial

Properties

Gets a value indicating whether the size is specified as a percentage.

C#
public readonly bool IsPercentage { get; }

Gets the value of the size. If IsPercentage is true, this is a fraction (e.g., 0.5 for 50%). Otherwise, it is an absolute value in pixels.

C#
public readonly double Value { get; }

Methods

Calculates the length in pixels based on the total length and the size value.

C#
public double CalculateLength(double totalLength)
Parameters:totalLengthdouble

The total length to calculate from.

Returns:

double

The calculated length in pixels.

Returns a string representation of the size, as a percentage or pixel value.

C#
public override string ToString()
Returns:

string

Overrides: ValueType.ToString()