我遇到错误:“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/