【发布时间】:2018-04-22 20:00:25
【问题描述】:
在 Xamarin.Forms 中,如何为 XAML 中的文本框设置前景色?
我尝试了以下方法:
<Style TargetType="{x:Type Entry}">
<Setter Property="BackgroundColor" Value="White" />
<Setter Property="Foreground" Value="Black" />
</Style>
我也试过了:
<Style TargetType="{x:Type Entry}">
<Setter Property="BackgroundColor" Value="White" />
<Setter Property="ForegroundColor" Value="Black" />
</Style>
当我尝试启动应用程序时,我收到了意外的异常。
有什么想法吗?
【问题讨论】:
标签: xaml xamarin.forms