简体   繁体   English

使用XAML在Xamarin.Forms中显示充满帧的滚动视图

[英]Displaying scroll view full of Frames in Xamarin.Forms with XAML

I'm new to Xamarin and C# and XAML and the whole thing. 我是Xamarin和C#和XAML以及整个事物的新手。 I'm trying to make a scroll view with multiple frames to be scrolled through. 我正在尝试使要滚动的多个帧成为滚动视图。 To do so, I have in a XAML file a set of Frames in a StackLayout in a ScrollView in a StackLayout in a ContentPage. 为此,我在XAML文件中在ContentPage的StackLayout中的ScrollView中的StackLayout中具有一组框架。 When I run this XAML code, I'm getting the following exception thrown: 当我运行此XAML代码时,会引发以下异常:

https://www.dropbox.com/s/3e35poo8bi0za53/Screenshot%202015-01-05%2001.27.49.png?dl=0 https://www.dropbox.com/s/3e35poo8bi0za53/Screenshot%202015-01-05%2001.27.49.png?dl=0

在此处输入图片说明

It's not very clear what is your exact problem because the screenshot doesn't show much. 目前尚不清楚您的确切问题是什么,因为屏幕截图显示得并不多。

This exception, however, is likely caused by trying to assign more than one child elements to an element that can only support one child, such as a Frame 但是,此异常很可能是由于尝试将多个子元素分配给仅支持一个子元素的元素(例如框架)引起的

In your XAML look for: 在您的XAML中寻找:

<Frame>
  <View...>
  <View...>
</Frame>

Also take a look at the inner exceptions of the one you're showing in the screenshot - some times Xamarin.Forms is generous enough to mention the parent element or property 还请看一下您在屏幕快照中显示的异常的内部异常-有时Xamarin.Forms足够慷慨地提及父元素或属性

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM