Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My Layout #40

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,28 +1,105 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
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="CollectionViewChallenge.Views.CollectionViewChallengePage">
<ContentPage
x:Class="CollectionViewChallenge.Views.CollectionViewChallengePage"
xmlns="http://xamarin.com/schemas/2014/forms"
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">
<ContentPage.Content>
<StackLayout>
<!-- Use your own layout and functionality here! -->
<!-- Use your own layout and functionality here! -->
<CollectionView>
<CollectionView.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>This is a CollectionView!</x:String>
<x:String>Your feedback on the experience of converting a ListView to a CollectionView is incredibly appreciated.</x:String>
<x:String>Here are three general questions:</x:String>
<x:String>1. How was the experience of converting your existing ListView to a CollectionView?</x:String>
<!--
It was easy, but I couldn't get the Pull to Refresh behavior
I found here: https://github.com/xamarin/Xamarin.Forms/issues/3172
IsPullToRefreshEnabled - this is now handled by the RefreshView.
But couldn't get it to work.
-->
<x:String>2. How is the performance compared to the ListView?</x:String>
<!-- Seems to be the same -->
<x:String>3. Is there a specific piece of functionality that you'd like to see?</x:String>
<!-- Infinite Scroll -->
</x:Array>
</CollectionView.ItemsSource>
<CollectionView.ItemTemplate>
<DataTemplate>
<StackLayout Padding="5">
<Label Text="{Binding .}" d:Text="Design Time Data" FontSize="10"/>
<StackLayout BackgroundColor="White" VerticalOptions="Center">
<ContentView Padding="20,15,20,15">
<StackLayout Spacing="0">
<Label
FontSize="16"
Text="{Binding .}"
TextColor="#17a19e"
VerticalOptions="Start"
VerticalTextAlignment="Start" />
<StackLayout Padding="0,10,5,0" Orientation="Horizontal">
<!--<Label
FontSize="10"
Text="&#xf095;"
TextColor="#17a19e"
VerticalTextAlignment="Center">
<Label.FontFamily>
<OnPlatform
x:TypeArguments="x:String"
Android="fa-solid-900.ttf#Font Awesome 5 Free Solid"
iOS="Font Awesome 5 Free" />
</Label.FontFamily>
</Label>-->
<Label
FontSize="10"
Text="{Binding .}"
TextColor="#51565f"
VerticalTextAlignment="Center" />
</StackLayout>
<StackLayout Padding="0,5,5,0" Orientation="Horizontal">
<!--<Label
FontSize="10"
Text="&#xf3c5;"
TextColor="#17a19e"
VerticalTextAlignment="Center">
<Label.FontFamily>
<OnPlatform
x:TypeArguments="x:String"
Android="fa-solid-900.ttf#Font Awesome 5 Free Solid"
iOS="Font Awesome 5 Free" />
</Label.FontFamily>
</Label>-->
<Label
FontSize="10"
Text="{Binding .}"
TextColor="#51565f"
VerticalTextAlignment="Center" />
</StackLayout>
<StackLayout Padding="0,5,5,0" Orientation="Horizontal">
<!--<Label
FontAttributes="Bold"
FontSize="10"
Text="&#xf108;"
TextColor="#17a19e"
VerticalTextAlignment="Center">
<Label.FontFamily>
<OnPlatform
x:TypeArguments="x:String"
Android="fa-solid-900.ttf#Font Awesome 5 Free Solid"
iOS="Font Awesome 5 Free" />
</Label.FontFamily>
</Label>-->
<Label
FontSize="10"
Text="{Binding .}"
TextColor="#51565f"
VerticalTextAlignment="Center" />
</StackLayout>
</StackLayout>
</ContentView>
<BoxView HeightRequest="0.1" Color="Gray" />
</StackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
Expand Down
Binary file added Comparison/CollectionView.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Comparison/ListView.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.