Skip to content

Instantly share code, notes, and snippets.

@Char0394
Created May 6, 2020 00:42
Show Gist options
  • Save Char0394/f09abc19c820f10f6c8f9a86010f7254 to your computer and use it in GitHub Desktop.
Save Char0394/f09abc19c820f10f6c8f9a86010f7254 to your computer and use it in GitHub Desktop.
<?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="ContactSharingXF.Views.ContactPage"
BackgroundColor="White">
<ContentPage.ToolbarItems>
<ToolbarItem Command="{Binding ShareCommand}"
Text="Share"
Order="Primary"
Priority="0" />
</ContentPage.ToolbarItems>
<ContentPage.Content>
<ScrollView>
<StackLayout>
<StackLayout Padding="40"
BackgroundColor="LightBlue">
<Frame IsClippedToBounds="True"
Padding="0"
HeightRequest="100"
WidthRequest="100"
HasShadow="False"
HorizontalOptions="Center"
CornerRadius="50">
<Image Source="{Binding Photo}"
Aspect="AspectFill"/>
</Frame>
<Label Text="{Binding FormattedName}"
HorizontalOptions="Center"
FontSize="Large"/>
<Label Text="{Binding OrganizationTitle}"
HorizontalOptions="Center"
FontSize="Medium"/>
<Label Text="{Binding Organization}"
HorizontalOptions="Center"
FontSize="Medium"/>
</StackLayout>
<StackLayout Padding="10"
Spacing="20">
<Label FontSize="Small">
<Label.FormattedText>
<FormattedString>
<Span Text="📞 " />
<Span Text="{Binding Phone1}"/>
<Span Text="(" />
<Span Text="{Binding Phone1Type}" />
<Span Text=")" />
</FormattedString>
</Label.FormattedText>
</Label>
<BoxView HeightRequest="1"
Color="LightGray"
HorizontalOptions="FillAndExpand"/>
<Label FontSize="Small">
<Label.FormattedText>
<FormattedString>
<Span Text="✉ " />
<Span Text="{Binding Email}"/>
<Span Text="(" />
<Span Text="{Binding Phone1Type}" />
<Span Text=")" />
</FormattedString>
</Label.FormattedText>
</Label>
<BoxView HeightRequest="1"
Color="LightGray"
HorizontalOptions="FillAndExpand"/>
<Label FontSize="Small">
<Label.FormattedText>
<FormattedString>
<Span Text="📍" />
<Span Text="{Binding Address}"/>
<Span Text="(" />
<Span Text="{Binding AddressType}" />
<Span Text=")" />
</FormattedString>
</Label.FormattedText>
</Label>
</StackLayout>
</StackLayout>
</ScrollView>
</ContentPage.Content>
</ContentPage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment