Azure Mobile Services, Part 2: Listing 2
MainPage.xaml Updated for Live Connect Login.
<Page
x:Class="VSMMobileServiceClient.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:VSMMobileServiceClient"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:live="using:Microsoft.Live.Controls"
mc:Ignorable="d">
<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
<StackPanel>
<StackPanel x:Name="MobileUser" Orientation="Horizontal">
<TextBlock>Logged in as</TextBlock>
<TextBlock x:Name="MobileLastName" Margin="10,0,0,0" Text="{Binding LastName}"></TextBlock>
<TextBlock>,</TextBlock>
<TextBlock x:Name="MobileFirstName" Text="{Binding FirstName}"></TextBlock>
</StackPanel>
<Button x:Name="SignOut" Click="SignOut_Click">Sign Out</Button>
<Button x:Name="SignIn" Visibility="Collapsed" Click="SignIn_Click">Sign In</Button>
<StackPanel x:Name="Contact" Visibility="Collapsed">
<TextBlock x:Name="UserDetail"></TextBlock>
<TextBlock>First Name</TextBlock>
<TextBox x:Name="FirstName" Text="{Binding FirstName, Mode=TwoWay}"></TextBox>
<TextBlock>Last Name</TextBlock>
<TextBox x:Name="LastName" Text="{Binding LastName, Mode=TwoWay}"></TextBox>
<TextBlock>Email</TextBlock>
<TextBox x:Name="Email" Text="{Binding Email, Mode=TwoWay}"></TextBox>
<TextBlock>Status</TextBlock>
<TextBlock x:Name="Status"></TextBlock>
<Button x:Name="Save" Click="Save_Click">Save</Button>
<Button x:Name="Delete" Click="Delete_Click" IsEnabled="False">Delete</Button>
<TextBlock>Contacts</TextBlock>
<ListBox x:Name="Contacts" MinHeight="100" SelectionChanged="Contacts_SelectionChanged">
</ListBox>
</StackPanel>
</StackPanel>
</Grid>
</Page>
About the Author
Eric Vogel is a Senior Software Developer for Red Cedar Solutions Group in Okemos, Michigan. He is the president of the Greater Lansing User Group for .NET. Eric enjoys learning about software architecture and craftsmanship, and is always looking for ways to create more robust and testable applications. Contact him at [email protected].