xamarin - 类型 'StackLayout' 的值不能添加到类型 'IList' 的集合或字

我遇到错误:“StackLayout”类型的值无法添加到“IList”类型的集合或字典中

 <StackLayout x:Name="Contunie" Margin="0" HeightRequest="80" HorizontalOptions="FillAndExpand" VerticalOptions="EndAndExpand" BackgroundColor="#24348b">
                <StackLayout.GestureRecognizers>
                    <TapGestureRecognizer Tapped="Contunie_Tapped"></TapGestureRecognizer>
                </StackLayout.GestureRecognizers>
                <Label Font="20" Margin="0,15,0,0"  HorizontalOptions="CenterAndExpand" TextColor="White"  
                   FontFamily="{DynamicResource GothamRoundedMedium}" Text="{Translator:Translate SendMessage}" BackgroundColor="Transparent"></Label>
            </StackLayout>

最佳答案

我遇到了同样的问题。重建将摆脱这个问题。如果您的 xaml 确实有问题,您的页面很可能无法加载。

关于xamarin - 类型 'StackLayout' 的值不能添加到类型 'IList' 的集合或字典中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50694069/

相关文章:

python - 当我使用 toastnotification 执行 python exe 时,显示

c# - 从 JSON 中提取第一个元素

java - 如何为不同类型的异常设置不同的状态码

python - importlib.reload() 没有将文件重新加载到 ipython 笔记本

python - 如何使用具有 NaN 值的 Pandas 计算中位数?

reactjs - 我如何模拟 reactjs 中的 promise ?

apache-kafka - Kafka 中的性能测试

qt - 没有安装 qmlscene : why is a warning sign next to

php - 如何显示在 php 中使用 file_get_contents 检索到的 pdf?

angular - 如何指定从根目录到 Assets Angular 的路径?