Xamarin.forms gridview在xamarin窗体中不工作
试图让xamarin表单中的gridview正常工作,但当我的应用程序到达页面时,它抛出IO异常 这是我的代码:Xamarin.forms gridview在xamarin窗体中不工作,xamarin.forms,xlabs,Xamarin.forms,Xlabs,试图让xamarin表单中的gridview正常工作,但当我的应用程序到达页面时,它抛出IO异常 这是我的代码: <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:controls="clr-namespace:XLabs.Forms.Controls;assembl
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:controls="clr-namespace:XLabs.Forms.Controls;assembly=XLabs.Forms.Controls"
x:Class="TamarianApp.ImagePage">
<Grid>
<StackLayout x:Name="mainView">
<ScrollView>
<StackLayout>
<BoxView Margin="0, -7, 0, 0" HorizontalOptions="FillAndExpand" HeightRequest="1" BackgroundColor="#f1f1f1"></BoxView>
<StackLayout x:Name="cameraMenuOption" Padding="10" Orientation="Horizontal" HorizontalOptions="Fill" >
<Label Margin="10, 2,0,0" HorizontalOptions="StartAndExpand">Camera</Label>
<Label x:Name="camera_label" Margin="10, 2,10,0" FontSize="14" TextColor="#c1c1c1" HorizontalOptions="End"></Label>
<Image HorizontalOptions="End" Source="icons/blue/next" WidthRequest="20"></Image>
</StackLayout>
<BoxView HorizontalOptions="FillAndExpand" HeightRequest="1" BackgroundColor="#f1f1f1"></BoxView>
<StackLayout x:Name="libraryMenuOption" Padding="10" Orientation="Horizontal" HorizontalOptions="Fill" >
<Label Margin="10, 2,0,0" HorizontalOptions="StartAndExpand">Library</Label>
<Label x:Name="library_label" Margin="10, 2,10,0" FontSize="14" TextColor="#c1c1c1" HorizontalOptions="End"></Label>
<Image HorizontalOptions="End" Source="icons/blue/next" WidthRequest="20"></Image>
</StackLayout>
</StackLayout>
</ScrollView>
<StackLayout BackgroundColor="#fafafa" HorizontalOptions="FillAndExpand" >
<BoxView HorizontalOptions="FillAndExpand" HeightRequest="3" BackgroundColor="#f1f1f1"></BoxView>
</StackLayout>
<StackLayout>
<controls:GridView x:Name="image_gallary">
<GridView.ItemTemplate>
<DataTemplate>
<Grid>
<Image Source="{Binding filepath}"></Image>
</Grid>
</DataTemplate>
</GridView.ItemTemplate>
</controls:GridView>
</StackLayout>
摄像机
图书馆
有人能帮我吗。请发布相关代码、异常、堆栈跟踪等。您发布的内容不足以让我们提供任何有意义的建议。这是您的全部观点吗?如果您的页面引发异常,那么您的out-most
Grid
和StackLayout
似乎缺少了一些关闭标记,知道特定的异常和源将是有用的系统IO异常xlabs.forms.controls.GridView未找到您是否在共享项目和平台项目中都安装了xlabs NuGet?