Xamarin.forms Stacklayout内部Xamarin表单网格问题
我正在开发Xamarin表单,需要在其中显示网格。我正在使用Xamarin.forms Stacklayout内部Xamarin表单网格问题,xamarin.forms,Xamarin.forms,我正在开发Xamarin表单,需要在其中显示网格。我正在使用StackLayout创建表单。一切都正常,直到我在StackLayout中添加网格,然后我得到一个错误,超时,获取异常详细信息 这是我的密码: <ContentPage.Content> <StackLayout VerticalOptions="StartAndExpand" BackgroundColor="White"> <StackLayout Paddin
StackLayout
创建表单。一切都正常,直到我在StackLayout
中添加网格,然后我得到一个错误,超时,获取异常详细信息
这是我的密码:
<ContentPage.Content>
<StackLayout VerticalOptions="StartAndExpand" BackgroundColor="White">
<StackLayout Padding="20,40,20,0" HorizontalOptions="CenterAndExpand">
<Image Source="logo.png" Aspect="AspectFit" HorizontalOptions="Center"></Image>
</StackLayout>
<StackLayout Padding="15,20,15,0" VerticalOptions="Center">
<local:ImageEntry TextColor="#98a4b4"
PlaceholderColor="#98a4b4" FontFamily="ProximaNova"
Image="LoginEmailIcon"
Placeholder="Email"
HorizontalOptions="FillAndExpand"
ImageWidth="25"
ImageHeight="20"
LineColor="#98a4b4"/>
<local:ImageEntry TextColor="#98a4b4"
PlaceholderColor="#98a4b4" FontFamily="ProximaNova"
Image="LoginPasswordIcon"
Placeholder="Password"
HorizontalOptions="FillAndExpand"
ImageWidth="23"
ImageHeight="25"
LineColor="#98a4b4" IsPassword="True"/>
<Label Text=" Forgot your password?"
HorizontalOptions="StartAndExpand" FontFamily="ProximaNova"
TextColor="#bcbcbc"/>
<StackLayout Orientation="Horizontal">
<Button x:Name="ButtonSignin" BackgroundColor="#29abdf" TextColor="White" HorizontalOptions="FillAndExpand" FontFamily="ProximaNova" Text="Sign in" FontAttributes="Bold"/>
</StackLayout>
<StackLayout Orientation="Horizontal" HorizontalOptions="CenterAndExpand">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="25px" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<Image Source="loginsideicon.png" Grid.Row="0" Grid.Column="0"></Image>
<Label Text="OR" Grid.Row="0" Grid.Column="1" FontFamily="ProximaNova" TextColor="#bcbcbc"></Label>
<Image Source="loginsideicon.png" Grid.Row="0" Grid.Column="2"></Image>
</Grid>
</StackLayout>
</StackLayout>
</StackLayout>
</ContentPage.Content>
现在,当我运行此代码时,出现异常:
Unhandled Exception:
System.FormatException: <Timeout exceeded getting exception details> occurred
未处理的异常:
System.FormatException:发生错误
但当我评论网格代码时,一切都正常运行我注意到您的xaml存在一些问题: -使用大写字母表示Auto
<ColumnDefinition Width="Auto" />
-我们不将25px与xaml一起使用
我注意到您的xaml存在一些问题:
-使用大写字母表示Auto
<ColumnDefinition Width="Auto" />
-我们不将25px与xaml一起使用