maui-linux/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issu.../Issue9196.xaml

56 строки
2.8 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<controls:TestContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:controls="clr-namespace:Xamarin.Forms.Controls"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
x:Class="Xamarin.Forms.Controls.Issues.Issue9196">
<ContentPage.Content>
<StackLayout>
<Label Text="Success"/>
<CollectionView x:Name="ReceiptsCollection" SelectionMode="Single" ItemSizingStrategy="MeasureAllItems"
ItemsSource="{Binding ReceiptsList}">
<CollectionView.EmptyView>
<StackLayout Padding="30">
<Label Text="No Receipt Available" HorizontalTextAlignment="Center"
VerticalTextAlignment="Center" LineBreakMode="WordWrap" Margin="0,10"></Label>
</StackLayout>
</CollectionView.EmptyView>
<CollectionView.ItemTemplate>
<DataTemplate>
<StackLayout>
<Grid Padding="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Label VerticalOptions="CenterAndExpand"
Text="DateTime"/>
<Label VerticalOptions="CenterAndExpand" FontAttributes="Bold" Grid.Column="1"
HorizontalTextAlignment="End">
<Label.FormattedText>
<FormattedString>
<Span Text="$" />
<Span Text="100" />
</FormattedString>
</Label.FormattedText>
</Label>
<Label VerticalOptions="CenterAndExpand" Grid.Row="1" Grid.ColumnSpan="2"
Text="Item"/>
</Grid>
</StackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</StackLayout>
</ContentPage.Content>
</controls:TestContentPage>