【发布时间】:2018-09-13 19:29:34
【问题描述】:
我是 Xamarin 的新手。我想了解<Style> 标签。我有问题当我开始在App.xaml 文件上添加标签时,出现警告消息。我不知道我犯了什么错误。希望你们能帮我解决这个问题。提前谢谢。
错误信息
App.xaml
<?xml version="1.0" encoding="utf-8" ?>
<Application xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TravelRecordApp.App">
<Application.Resources>
<!-- Application resource dictionary -->
<ResourceDictionary>
<Color x:Key="blueColor">#1E90FF</Color>
<Color x:Key="whiteColor">#FFFFFF</Color>
<Style>
<Setter Property="BackgroundColor" Value="{StaticResource blueColor}" />
<Setter Property="TextColor" Value="{StaticResource whiteColor}"/>
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>
【问题讨论】: