Class BottomSheetLength
Represents a size for the bottom sheet, which can be specified as a percentage or an absolute value.
Inheritance
Namespace: Telerik.Maui.Controls.BottomSheet
Assembly: Telerik.Maui.Controls.dll
Syntax
public sealed class BottomSheetLength : ValueType
Constructors
BottomSheetLength(Double, Boolean)
Initializes a new instance of the BottomSheetLength.
Declaration
public BottomSheetLength(double value, bool isPercentage = false)
Parameters
System.Double
value
The size value, either as a percentage (e.g., 0.5 for 50%) or an absolute value in pixels. |
System.Boolean
isPercentage
Indicates whether the value is a percentage. |
Fields
Full
Represents a full bottom sheet state with height 90%.
Declaration
public static readonly BottomSheetLength Full
Field Value
BottomSheetLength
|
Hidden
Represents a hidden bottom sheet state.
Declaration
public static readonly BottomSheetLength Hidden
Field Value
BottomSheetLength
|
Minimal
Represents a minimal bottom sheet state with height 25%.
Declaration
public static readonly BottomSheetLength Minimal
Field Value
BottomSheetLength
|
Partial
Represents a partial bottom sheet state with height 50%.
Declaration
public static readonly BottomSheetLength Partial
Field Value
BottomSheetLength
|
Properties
IsPercentage
Gets a value indicating whether the size is specified as a percentage.
Declaration
public bool IsPercentage { get; }
Property Value
System.Boolean
|
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
public double Value { get; }
Property Value
System.Double
|
Methods
CalculateLength(Double)
Calculates the length in pixels based on the total length and the size value.
Declaration
public double CalculateLength(double totalLength)
Parameters
System.Double
totalLength
The total length to calculate from. |
Returns
System.Double
The calculated length in pixels. |
ToString()
Returns a string representation of the size, as a percentage or pixel value.
Declaration
public override string ToString()
Returns
System.String
|