Label text clipping bottom or top in xamarin forms uwp

rio_riyario_riya INMember ✭✭

While using the label the bottom or top of the text is cutting slightly. Even I have given enough height it's still there. You could see in the following
screenshot the word is slightly cut in the bottom.

Have anyone faced this issue, please help. Thanks in advance.

Answers

  • JohnHardmanJohnHardman GBUniversity mod

    @rio_riya

    Post the XAML/C# that you used to create the screenshot posted above

  • rio_riyario_riya INMember ✭✭
    edited February 6

    This is the Label I have used in the page

    <Label Text="Issue Voucher" Grid.Row="0" Grid.Column="0"/>

    The label contains following style:

       <Style TargetType="Label">
            <Setter Property="FontSize" Value="Small"/>
            <Setter Property="TextColor" Value="{StaticResource Black}"/>
            <Setter Property="VerticalOptions" Value="FillAndExpand"/>
            <Setter Property="HorizontalOptions" Value="FillAndExpand"/>
            <Setter Property="HorizontalTextAlignment" Value="Center"/>
            <Setter Property="VerticalTextAlignment" Value="Center"/>
            <Setter Property="BackgroundColor" Value="{StaticResource Transparent}"/>
            <Setter Property="FontFamily" Value="/Assets/OpenSans-Regular.tff#Open Sans"/>
        </Style>
    
  • JohnHardmanJohnHardman GBUniversity mod
    edited February 6

    @JohnHardman said:
    Post the XAML/C# that you used to create the screenshot posted above

    You haven't included the XAML for the page, only the Label. However, from what you have posted, I'd suggest having a look at the definition of the Grid and the sizing of the first RowDefinition.

    Also, as a debugging aid, you might find it useful to change BackgroundColor of the various UI elements so that each has a unique color.

  • rio_riyario_riya INMember ✭✭
    edited February 7
    <Grid>
    <Grid.Rowdefinitions>
    <RowDefinition Height=15*/>
    <RowDefinition Height=70*/>
    <RowDefinition Height=15*/>
    </Grid.Rowdefinitions>
    <Label Text="Issue Voucher" Grid.Row="0" BackgroundColor="LightGray"/>
    <Grid Grid.Row="1" BackgroundColor="Bisque">
    some of items
    </Grid>
    </Grid>
    

    Actually this is the XAML for above screenshot. The height of the Label is still having enough space, you could see its LightGray background but still the issue exists.

  • JohnHardmanJohnHardman GBUniversity mod
    edited February 7

    @rio_riya said:
    Actually this is the XAML for above screenshot

    @JohnHardman said:

    @JohnHardman said:
    Post the XAML/C# that you used to create the screenshot posted above

    You haven't included the XAML for the page

    Please post the entire XAML for the page, and a screenshot that shows the whole page. Also, post the definitions of any Styles that are used by Views on the page.

  • rio_riyario_riya INMember ✭✭
    edited February 16

    Hi @JohnHardman , the styles used in the page is not the reason for the problem actually. Its because of using Native popup layouts. Other pages are fine with the same label, the labels used in the native popup only causing the text layoff. Do you have any idea's regarding to this?

  • JohnHardmanJohnHardman GBUniversity mod

    @rio_riya said:
    Hi @JohnHardman , the styles used in the page is not the reason for the problem actually. Its because of using Native popup layouts. Other pages are fine with the same label, the labels used in the native popup only causing the text layoff. Do you have any idea's regarding to this?

    That's the first mention of native popup layouts. Without complete information, it wouldn't be a good use of either my time or your time for me to to list a whole load of possible causes.

Sign In or Register to comment.