Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Hanselman.Portable.Views.TwitterPage"
xmlns:controls="clr-namespace:ImageCircle.Forms.Plugin.Abstractions;assembly=ImageCircle.Forms.Plugin.Abstractions"
Title="Tweets">
<StackLayout Padding="0,8"
Orientation="Vertical">
<ActivityIndicator IsVisible="{Binding IsBusy}"
IsRunning="{Binding IsBusy}"
Color="#2C3E50"/>
<ListView x:Name="listView"
ItemsSource="{Binding Tweets}"
HasUnevenRows="True">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid Padding="10,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<controls:CircleImage Source="{Binding Image}" VerticalOptions="Start">
<controls:CircleImage.WidthRequest>
<OnPlatform x:TypeArguments="x:Double">
<OnPlatform.iOS>55</OnPlatform.iOS>
<OnPlatform.Android>55 </OnPlatform.Android>
<OnPlatform.WinPhone>75</OnPlatform.WinPhone>
</OnPlatform>
</controls:CircleImage.WidthRequest>
<controls:CircleImage.HeightRequest>
<OnPlatform x:TypeArguments="x:Double">
<OnPlatform.iOS>55</OnPlatform.iOS>
<OnPlatform.Android>55</OnPlatform.Android>
<OnPlatform.WinPhone>75</OnPlatform.WinPhone>
</OnPlatform>
</controls:CircleImage.HeightRequest>
</controls:CircleImage>
<StackLayout Grid.Column="1"
Padding="8"
Spacing="4"
VerticalOptions="Center">
<Label Text="{Binding Date}" FontSize="Medium" LineBreakMode="NoWrap"/>
<Label Text="{Binding Text}" x:Name="TweetText" FontSize="Small" LineBreakMode="WordWrap"/>
</StackLayout>
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</ContentPage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment