Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
66 lines (65 sloc) 3.49 KB
<?xml version="1.0" encoding="UTF-8" ?>
<controls:CommandView x:Class="SampleApplication.Views.HealthProviderCard"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:controls="clr-namespace:Core.Controls;assembly=XForms.Shared"
xmlns:ic="clr-namespace:ImageCircle.Forms.Plugin.Abstractions;assembly=ImageCircle.Forms.Plugin.Abstractions"
x:Name="HealthProviderCard">
<ContentView.Content>
<Frame HasShadow="True">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid IsVisible="{Binding IsForSelection, Source={x:Reference HealthProviderCard}}">
<BoxView BackgroundColor="{StaticResource Accent}"
IsVisible="{Binding Value.IsSelected,
Source={x:Reference HealthProviderCard}}"
WidthRequest="5" />
</Grid>
<ic:CircleImage Grid.Column="1"
Aspect="AspectFill"
BorderColor="#2C92D1"
BorderThickness="1"
HeightRequest="90"
Source="{Binding Value.ImageName,
Source={x:Reference HealthProviderCard}}"
WidthRequest="90" />
<Grid Grid.Column="2">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Text="{Binding Value.Name, Source={x:Reference HealthProviderCard}}" />
<Label Grid.Row="1"
FontSize="Small"
Text="{Binding Value.Description,
Source={x:Reference HealthProviderCard}}"
TextColor="Silver" />
<Grid Grid.Row="2" HorizontalOptions="EndAndExpand">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Label Text="{Binding Value.DistanceFromCurrentLocation, Source={x:Reference HealthProviderCard}, StringFormat='{0:F2} km'}}" />
<Image Grid.Column="1"
HeightRequest="20"
Source="location"
WidthRequest="20" />
</Grid>
</Grid>
<Image Grid.Column="2"
HeightRequest="25"
HorizontalOptions="End"
IsVisible="{Binding Value.IsPinned,
Source={x:Reference HealthProviderCard}}"
Source="pinned"
VerticalOptions="Start"
WidthRequest="25" />
</Grid>
</Frame>
</ContentView.Content>
</controls:CommandView>