Struct
BottomSheetLength

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:

cs-api-definition
[TypeConverter(typeof(BottomSheetLengthTypeConverter))]
public struct BottomSheetLength

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

Constructors

BottomSheetLength(double, bool)

Initializes a new instance of the BottomSheetLength.

Declaration

cs-api-definition
public BottomSheetLength(double value, bool isPercentage = false)

Parameters

value

double

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

isPercentage

bool

Indicates whether the value is a percentage.

Fields

Full

Represents a full bottom sheet state with height 90%.

Declaration

cs-api-definition
public static readonly BottomSheetLength Full

Field Value

BottomSheetLength

Hidden

Represents a hidden bottom sheet state.

Declaration

cs-api-definition
public static readonly BottomSheetLength Hidden

Field Value

BottomSheetLength

Minimal

Represents a minimal bottom sheet state with height 25%.

Declaration

cs-api-definition
public static readonly BottomSheetLength Minimal

Field Value

BottomSheetLength

Partial

Represents a partial bottom sheet state with height 50%.

Declaration

cs-api-definition
public static readonly BottomSheetLength Partial

Field Value

BottomSheetLength

Properties

IsPercentage

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

Declaration

cs-api-definition
public readonly bool IsPercentage { get; }

Property Value

bool

Value

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.

Declaration

cs-api-definition
public readonly double Value { get; }

Property Value

double

Methods

CalculateLength(double)

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

Declaration

cs-api-definition
public double CalculateLength(double totalLength)

Parameters

totalLength

double

The total length to calculate from.

Returns

double

The calculated length in pixels.

ToString()

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

Declaration

cs-api-definition
public override string ToString()

Returns

string

Overrides ValueType.ToString()