Back to Devexpress

DxRadio<TValue>.LabelWrapMode Property

blazor-devexpress-dot-blazor-dot-dxradio-1-30cc51c6.md

latest2.0 KB
Original Source

DxRadio<TValue>.LabelWrapMode Property

Specifies word wrap style for the label.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public override LabelWrapMode LabelWrapMode { get; set; }

Property Value

TypeDescription
LabelWrapMode

A LabelWrapMode enumeration value.

|

Available values:

NameDescription
WordWrap

The label is divided into multiple lines to keep text within the target area.

| | NoWrap |

The label is displayed in full.

| | Ellipsis |

The label is cropped to fit into a container and has an end ellipsis.

|

Remarks

The Radio component consists of the clickable circle and label. If the label is too long to fit the parent component, you can wrap or crop the label. To do this, use the LabelWrapMode property.

The following example applies the Ellipsis label wrap mode:

razor
<div class="container" role="radiogroup">
@foreach (var value in Values) {
    <DxRadio GroupName="priorities-radio-group"
             @bind-GroupValue="@SelectedValue"
             Value="@value"
             LabelWrapMode="LabelWrapMode.Ellipsis">
        @value
    </DxRadio>
}
</div>

@code {
    string SelectedValue { get; set; } = "Parking camera";
    IEnumerable<string> Values = new[] { "Parking camera", "Heated seats", "Air conditioning" };
}
css
.container {
    width: 120px; 
    border: 1px dashed black;
}

See Also

DxRadio<TValue> Class

DxRadio<TValue> Members

DevExpress.Blazor Namespace