0

我在我的应用程序上使用自定义字体。然而,文本在 IOS 上被剪掉了。我将它固定在“标签”上,将“行高”设置为 (1.2)。但占位符仍在剪切。我该如何修复它?

在此处输入图像描述

放大,看 这是我的相框。

    <ContentView.Content>
    <StackLayout>
        <views:CustomShadowFrame x:Name="FrameBox" Style="{StaticResource CustomizableEntryFrame}" Padding="0">
            <Grid ColumnSpacing="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="{Binding ImageColumnWidth,Source={x:Reference View}}"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Image Grid.Column="0" Source="{Binding ImageSource,Source={x:Reference View}}" Style="{StaticResource CustomizableImageButtonImage}" ></Image>
                <Entry Grid.Column="1" x:Name="EntryValue"  Text="{Binding TextValue,Source={x:Reference View}}"
                       Style="{StaticResource CustomizableEntryEntry}"
                       Placeholder="{Binding PlaceholderText,Source={x:Reference View}}"
                       IsPassword="{Binding IsItPassword,Source={x:Reference View}}"
                       Keyboard="{Binding KeyboardType,Source={x:Reference View}}" >
                </Entry>
            </Grid>
        </views:CustomShadowFrame>
    </StackLayout>

</ContentView.Content>

        <Style x:Key="CustomizableEntryFrame" TargetType="Frame">
            <Setter Property="HasShadow" Value="False" ></Setter>
            <Setter Property="BackgroundColor" Value="White" ></Setter>
            <Setter Property="HeightRequest" Value="54" ></Setter>
            <Setter Property="CornerRadius" Value="8" ></Setter>
            <Setter Property="BorderColor" Value="White" ></Setter>
            <Setter Property="VerticalOptions" Value="CenterAndExpand"></Setter>
            <Setter Property="Padding" Value="0" ></Setter>
        </Style>
            <Style x:Key="CustomizableEntryEntry" TargetType="Entry">
            <Setter Property="FontFamily" Value="{StaticResource NormalFont}"></Setter>
            <Setter Property="PlaceholderColor" Value="#5f5d70"></Setter>
            <Setter Property="FontSize" Value="14"></Setter>
            <Setter Property="HeightRequest">
                <OnPlatform x:TypeArguments="x:Double">
                    <On Platform="iOS" Value="25"/>
                    <On Platform="Android" Value="35"/>
                </OnPlatform>
            </Setter>
            <Setter Property="Margin">
                <OnPlatform x:TypeArguments="Thickness">
                    <On Platform="Android" Value="0,0,15,0"/>
                    <On Platform="iOS" Value="0, 3, 15, -3"/>
                </OnPlatform>
            </Setter>
            <Setter Property="VerticalOptions" Value="Center"></Setter>
        </Style>
            <OnPlatform x:TypeArguments="x:String" x:Key="NormalFont">
            <On Platform="Android" Value="CooperHewitt-Medium.otf#Cooper Hewitt Medium" />
            <On Platform="iOS" Value="CooperHewitt-Medium" />
        </OnPlatform>
4

0 回答 0