我有ListView的問題,我需要出示該列表以全屏顯示。在我的ItemSource中有55行。的ListView [Xamarin.Forms]
這是我的代碼片段。
<Grid Grid.Row="0" BackgroundColor="#5FB1E0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="Auto"></ColumnDefinition>
</Grid.ColumnDefinitions>
<StackLayout Grid.Column="0" Margin="10">
<Image x:Name="ImageMenu" Source="{local:ImageResource HRiS.images.menu.png}" HeightRequest="40"></Image>
</StackLayout>
<Label Grid.Column="1" x:Name="LabelHome" FontSize="18" TextColor="White" VerticalTextAlignment="Center"></Label>
</Grid>
<ListView Grid.Row="1" x:Name="listEmployeeDirectory" HasUnevenRows="True" VerticalOptions="FillAndExpand"
IsPullToRefreshEnabled="True" >
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Padding="5,10">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Image Grid.Column="0" HeightRequest="50">
<Image.Source>
<UriImageSource Uri="{Binding ProfileImage}" CacheValidity="5" CachingEnabled="true" />
</Image.Source>
</Image>
<Label Grid.Column="1" Text="{Binding FullName}" HorizontalOptions="StartAndExpand"
VerticalTextAlignment="Center" TextColor="Black" FontSize="18" FontFamily="Droid Sans Mono" />
</Grid>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
什麼是您的第1行的行定義是什麼?我的意思是我很抱歉,行 – Mounika
的高度,RowDefinition的行0是汽車,第1行是*(星號) –