为什么编辑器文本不会更改XamarinForms中的文本颜色

问题描述 投票:0回答:1

我设置了属性TextColor =“ White”,但是当我测试应用程序时,编辑器的textColor为黑色

<ScrollView HeightRequest="90" Grid.Row="7" Grid.Column="0"    
            IsVisible="{Binding TurnOnPrivacyPolicyMessage}">
   <Editor x:Name="txtMensaje" TextColor="White"  
           BackgroundColor="Transparent" IsEnabled="False" > 
   </Editor>
</ScrollView>
xamarin.forms editor textcolor
1个回答
0
投票

我使用您的代码进行测试,但是我发现Editor TextColor是白色的,而不是黑色的。

因为您将Editor BackGroundColor设置为Transparent,TextColor是白色,您可能看不到文本清晰,所以建议您将BackgroundColor设置为Gray或其他进行测试。

<StackLayout>

        <Editor
            x:Name="txtMensaje"
            BackgroundColor="Transparent"
            TextColor="White" />

    </StackLayout>
© www.soinside.com 2019 - 2024. All rights reserved.