Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Problem with StackLayout and Label tail truncation

$
0
0

Time label is clipped, while it should not:

https://monosnap.com/file/2Gpp3PkcDfQi5NR6q3Ys5XprHE5zLI

Here is the code:

<StackLayout
    Orientation="Horizontal"
    Spacing="5"
    Padding="12, 6, 12, 3">
    <StackLayout
        Spacing="3"
        Orientation="Vertical"
        HorizontalOptions="FillAndExpand">
        <Label
            Text="{Binding Title}"
            FontSize="17"
            TextColor="White"/>
        <StackLayout
            Orientation="Horizontal">
            <Image
                Source="ContactIcon"/>
            <Label
                Text="{Binding RecipientText}"
                FontSize="13"
                Opacity="0.5"
                TextColor="White"/>
        </StackLayout>
        <StackLayout
            Orientation="Horizontal">
            <Image
                Source="RepeatIcon"/>
            <Label
                Text="{Binding DaysOfWeek, Converter={local:DaysOfWeekToStringConverter}}"
                Opacity="0.5"
                FontSize="11"
                TextColor="White"/>
        </StackLayout>
    </StackLayout>
    <!-- This label is clipped -->
    <Label
        LineBreakMode="NoWrap"
        Text="{Binding LocalTime, StringFormat='{0:HH:mm}'}"
        FontSize="50"
        TextColor="White"/>
</StackLayout>

And i also has default style for label:

<Style TargetType="Label">
    <Setter Property="LineBreakMode" Value="TailTruncation"/>
</Style>

Any ideas how to make it correct? Seems that it is a bug of StackLayout and/or label.


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>