У меня есть два представления Listview: общий счет-фактура и одно, содержащее все детали товаров, которые были в счете (элементы корзины)
Вы заметите огромный пробел между Основной порядок и список предметов, я не могу избавиться от пробелов, не устанавливая жестких значений, которых я бы хотел избежать. У кого-нибудь есть идеи?
Является ли Listview просто занимающим место для другого элемента, но может содержать только один, может быть?
Просто для пояснения, я могу дать верхнему Listview запрос высоты, скажем, около 310, чтобы получить интервал верно, но я ищу способ, который не требует от меня установки. жесткое значение, которое может искажать некоторые телефоны
<ContentPage.Content>
<StackLayout BackgroundColor="Transparent" Spacing="0" Opacity="1" HorizontalOptions="FillAndExpand"
Margin="4,0,4,0" VerticalOptions="StartAndExpand">
<Label Text="Main Order" TextColor="White" HeightRequest="30" HorizontalOptions="Center"
VerticalOptions="Center" FontSize="Title" FontAttributes="Bold" />
<ListView x:Name="SingleOrderList"
BackgroundColor="Transparent"
HasUnevenRows="True"
VerticalOptions="Start"
HorizontalOptions="FillAndExpand"
SeparatorVisibility="Default">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ViewCell.View>
<Frame CornerRadius="20" BackgroundColor="White" Margin="4,0,4,0" Padding="27">
<StackLayout BackgroundColor="Transparent" Orientation="Vertical" Spacing="0">
<Label HorizontalTextAlignment="Center" TextColor="Black">
<Label.FormattedText>
<FormattedString>
<Span Text="ID:" FontAttributes="Bold" FontSize="Large" />
<Span Text="{ Binding id }" FontAttributes="Bold" FontSize="Large" />
</FormattedString>
</Label.FormattedText>
</Label>
<Label HorizontalTextAlignment="Center" TextColor="Black">
<Label.FormattedText>
<FormattedString>
<Span Text="Mail:" />
<Span Text="{ Binding billing.email }" FontAttributes="Bold"
FontSize="Medium" />
</FormattedString>
</Label.FormattedText>
</Label>
<Label HorizontalTextAlignment="Center" TextColor="Black">
<Label.FormattedText>
<FormattedString>
<Span Text="Date:" />
<Span Text="{ Binding date_created }" FontAttributes="Bold"
FontSize="Medium" />
</FormattedString>
</Label.FormattedText>
</Label>
<Label HorizontalTextAlignment="Center" TextColor="Black">
<Label.FormattedText>
<FormattedString>
<Span Text="Status:" />
<Span Text="{ Binding status }" FontAttributes="Bold"
FontSize="Medium" />
</FormattedString>
</Label.FormattedText>
</Label>
<Label HorizontalTextAlignment="Center" TextColor="Black">
<Label.FormattedText>
<FormattedString>
<Span Text="{ Binding total, StringFormat='Total R:{0,5:#,0.00}' }"
FontAttributes="Bold" FontSize="Medium" />
</FormattedString>
</Label.FormattedText>
</Label>
</StackLayout>
</Frame>
</ViewCell.View>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<Label Text="ITEMS" TextColor="White" HeightRequest="30" HorizontalOptions="Center"
VerticalOptions="Center" FontSize="Title" FontAttributes="Bold" />
<ListView BackgroundColor="Transparent"
x:Name="Lineorders"
HasUnevenRows="True"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
SeparatorVisibility="Default">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ViewCell.View>
<Frame CornerRadius="20" BackgroundColor="White" Margin="10" Padding="20">
<StackLayout
Spacing="0"
BackgroundColor="Transparent"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand">
<Label HorizontalTextAlignment="Center" TextColor="Black">
<Label.FormattedText>
<FormattedString>
<Span Text="Product:" FontAttributes="Bold" FontSize="Large" />
<Span Text="{ Binding name }" FontAttributes="Bold"
FontSize="Large" />
</FormattedString>
</Label.FormattedText>
</Label>
<Label HorizontalTextAlignment="Center" TextColor="Black">
<Label.FormattedText>
<FormattedString>
<Span Text="Price:" />
<Span
Text="{ Binding price,StringFormat={}{0:0.####################}}"
FontAttributes="Bold" FontSize="Medium" />
</FormattedString>
</Label.FormattedText>
</Label>
<Label HorizontalTextAlignment="Center" TextColor="Black">
<Label.FormattedText>
<FormattedString>
<Span Text="Sku:" />
<Span Text="{ Binding sku }" FontAttributes="Bold"
FontSize="Medium" />
</FormattedString>
</Label.FormattedText>
</Label>
<Label HorizontalTextAlignment="Center" TextColor="Black">
<Label.FormattedText>
<FormattedString>
<Span
Text="{ Binding total , StringFormat='Total R:{0,5:#,0.00}' }"
FontAttributes="Bold" FontSize="Medium" />
</FormattedString>
</Label.FormattedText>
</Label>
<Label HorizontalTextAlignment="Center" TextColor="Black">
<Label.FormattedText>
<FormattedString>
<Span Text="Quantity:" />
<Span Text="{ Binding quantity }" FontAttributes="Bold"
FontSize="Medium" />
</FormattedString>
</Label.FormattedText>
</Label>
</StackLayout>
</Frame>
</ViewCell.View>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</ContentPage.Content>
Что я ищу без HeightRequest