Skip to content

Instantly share code, notes, and snippets.

@IanLeatherbury
Created November 25, 2014 22:48
Show Gist options
  • Save IanLeatherbury/bf43a522063e88e94f29 to your computer and use it in GitHub Desktop.
Save IanLeatherbury/bf43a522063e88e94f29 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="Xamarins.EditEmployeeDetailPage">
<ScrollView VerticalOptions="FillAndExpand">
<StackLayout>
<StackLayout Orientation="Horizontal" VerticalOptions="Start" Padding="15">
<!--This section allows Employee to change their picture-->
<RelativeLayout>
<Image Source="{Binding PhotoUrl}"
HeightRequest="115"
WidthRequest="115"
x:Name="PhotoUrl"
/>
<BoxView Color = "#bdc3c7" Opacity=".75" WidthRequest="115" HeightRequest="25"
RelativeLayout.XConstraint=
"{ConstraintExpression Type=RelativeToView,
Property=X,
ElementName=PhotoUrl,
Constant=0}"
RelativeLayout.YConstraint=
"{ConstraintExpression Type=RelativeToView,
Property=Y,
ElementName=PhotoUrl,
Constant=90}"
/>
<Button Text="CHANGE" TextColor="White" Clicked="ChangePhoto"
RelativeLayout.XConstraint=
"{ConstraintExpression Type=RelativeToView,
Property=X,
ElementName=PhotoUrl,
Constant=25}"
RelativeLayout.YConstraint=
"{ConstraintExpression Type=RelativeToView,
Property=Y,
ElementName=PhotoUrl,
Constant=80}"
/>
</RelativeLayout>
<!-- This section allows an Employee to change their First and Last name-->
<StackLayout HorizontalOptions="StartAndExpand">
<Label Text="First" Font="Small" TextColor="#1D62F0"/>
<Entry Text="{Binding Employee.FirstName}" />
<BoxView Color="#bdc3c7" HeightRequest="1"/>
<Label Text="Last" Font="Small" TextColor="#1D62F0"/>
<Entry Text="{Binding Employee.LastName}" />
</StackLayout>
</StackLayout>
<!--This section has the rest of the Employees details-->
<StackLayout Padding="15">
<!--Nickname section-->
<Label Text="nickname" Font="Small" TextColor="#1D62F0" />
<Entry Text="{Binding Employee.Nickname}" />
<BoxView Color="#bdc3c7" HeightRequest="1" HorizontalOptions="FillAndExpand" />
<!--Title section-->
<Label Text="title" Font="Small" TextColor="#1D62F0" />
<Entry Text="{Binding Employee.JobTitle}" />
<BoxView Color="#bdc3c7" HeightRequest="1" HorizontalOptions="FillAndExpand"/>
<!--Email Section-->
<Label Text="email" Font="Small" TextColor="#1D62F0" />
<Entry Text="{Binding Employee.WorkEmail}"/>
<BoxView Color="#bdc3c7" HorizontalOptions="FillAndExpand" HeightRequest="1"/>
<!--Mobile section-->
<Label Text="mobile" Font="Small" TextColor="#1D62F0" />
<Entry Text="{Binding Employee.MobilePhone}" />
</StackLayout>
</StackLayout>
</ScrollView>
</ContentPage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment