Xamarin.forms 为什么编辑器文本没有';t更改表单中的文本颜色
我设置了属性TextColor=“White”,但当我测试应用程序时,编辑器的TextColor是黑色的Xamarin.forms 为什么编辑器文本没有';t更改表单中的文本颜色,xamarin.forms,editor,textcolor,Xamarin.forms,Editor,Textcolor,我设置了属性TextColor=“White”,但当我测试应用程序时,编辑器的TextColor是黑色的 <ScrollView HeightRequest="90" Grid.Row="7" Grid.Column="0" IsVisible="{Binding TurnOnPrivacyPolicyMessage}"> <Editor x:Name="txtMensaje" TextColor="White"
<ScrollView HeightRequest="90" Grid.Row="7" Grid.Column="0"
IsVisible="{Binding TurnOnPrivacyPolicyMessage}">
<Editor x:Name="txtMensaje" TextColor="White"
BackgroundColor="Transparent" IsEnabled="False" >
</Editor>
</ScrollView>
我使用您的代码进行测试,但我发现编辑器TextColor是白色的,而不是黑色的 因为您设置的编辑器BackGroundColor是透明的,TextColor是白色的,您可能看不到清晰的文本,所以我建议您可以将BackGroundColor设置为灰色或其他颜色进行测试
<StackLayout>
<Editor
x:Name="txtMensaje"
BackgroundColor="Transparent"
TextColor="White" />
</StackLayout>
背景色是透明的:
背景颜色为灰色:
我找到了答案问题是当propyte为isEnbaled=flase时编辑器的文本颜色为黑色如果propyte为true,则文本采用textColor的颜色Propyte@Angle,这太奇怪了,因为当Editor isEnable=false时,你不能输入任何字符,你可以这样做吗?@Abgel,我测试它,正如你所说,它是有效的,因此,请在这里分享您的解决方案或将您的解决方案标记为答案,或者您可以标记任何有助于您的答案,谢谢。