Skip to main content

FlexStyleValues

Namespace: BlazorNative.Components

Converts the flex enums to the CSS-cased strings the Android and iOS shells read.

public static class FlexStyleValues

Inheritance ObjectFlexStyleValues
Attributes NullableContextAttribute, NullableAttribute, ExtensionAttribute

Remarks:

The components call these for you — you need them only if you are building a component that speaks to the shells directly. The nullable overloads map null to null, which a component emits as no value at all, leaving the layout engine's own default in place.

Methods

ToStyleValue(FlexDirection)

CSS-cased wire value for value.

public static string ToStyleValue(FlexDirection value)

Parameters

value FlexDirection

Returns

String

ToStyleValue(FlexJustify)

CSS-cased wire value for value.

public static string ToStyleValue(FlexJustify value)

Parameters

value FlexJustify

Returns

String

ToStyleValue(FlexAlign)

CSS-cased wire value for value.

public static string ToStyleValue(FlexAlign value)

Parameters

value FlexAlign

Returns

String

ToStyleValue(FlexWrap)

CSS-cased wire value for value.

public static string ToStyleValue(FlexWrap value)

Parameters

value FlexWrap

Returns

String

ToStyleValue(FlexPosition)

CSS-cased wire value for value.

public static string ToStyleValue(FlexPosition value)

Parameters

value FlexPosition

Returns

String

ToStyleValue(FlexDirection?)

CSS-cased wire value for value.

public static string? ToStyleValue(FlexDirection? value)

Parameters

value FlexDirection?

Returns

String?

ToStyleValue(FlexJustify?)

CSS-cased wire value for value.

public static string? ToStyleValue(FlexJustify? value)

Parameters

value FlexJustify?

Returns

String?

ToStyleValue(FlexAlign?)

CSS-cased wire value for value.

public static string? ToStyleValue(FlexAlign? value)

Parameters

value FlexAlign?

Returns

String?

ToStyleValue(FlexWrap?)

CSS-cased wire value for value.

public static string? ToStyleValue(FlexWrap? value)

Parameters

value FlexWrap?

Returns

String?

ToStyleValue(FlexPosition?)

CSS-cased wire value for value.

public static string? ToStyleValue(FlexPosition? value)

Parameters

value FlexPosition?

Returns

String?

ToStyleValue(Single?)

Numeric → wire string, INVARIANTLY (the shells parse with a C/Java float parser: a Dutch locale must never put "1,5" on the wire). Null stays null — no attribute, no patch.

public static string? ToStyleValue(float? value)

Parameters

value Single?

Returns

String?