Wednesday, April 9, 2014

WINDOWS PHONE FIRST APPLICATION



Therefore, whenever we make the application,
 which has always been to get authenticated users
and this makes the login page feature very basic 
 and common service consumer of any application. 
 Here you will create a user-driven login page 
 and more convincing end. 
1. The most important aspect of any login page 
 and determine first what we need for user authentication. 
2. Usually, services authenticate users via e-mail
 addresses of their own and there is a user name and password. 
3. It consists of email
A. User name

B. Service Provider


<phone:PhoneApplicationPage 
    x:Class="WindowsPhoneApplication1.wndLogin"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True" 
 xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;
assembly=Microsoft.Phone.Controls.Toolkit" Title=""
    toolkit:TiltEffect.IsTiltEnabled="True">
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        Grid.RowDefinitions>
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="0,0,0,0">
            <StackPanel x:Name="LoginPanel" Grid.Row="0" 
Margin="12,17,0,28" Visibility="Visible">
                <Rectangle Height="20" />
                <StackPanel Orientation="Horizontal" Height="248">
                <TextBlock x:Name="tbLable_Copy" Margin="10,0,0,0" 
 Text="Please enter your .com login credentials,
 If don't have account, please signup from a PC near you.
" FontSize="22" FontFamily="Segoe WP" Height="166" 
 TextWrapping="wrap" Width="252">
                     <TextBlock.Foreground>
                           <SolidColorBrush 
Color="{StaticResource PhoneForegroundColor}" />
 


                     TextBlock.Foreground>TextBlock>
                <toolkit:HubTile Height="184" Name="HubTile1" 
Width="188" Message="Share Your Whereabouts with your friends"
  Source="/WinWebRequest;component/tile.jpg" Title="" IsFrozen="False" />
                StackPanel>
                <TextBlock x:Name="tbError" Text="Username" 
 FontSize="22" FontFamily="Segoe WP Semibold" Foreground="Red" 
Visibility="Collapsed" />
                
                <TextBlock x:Name="tbLable" Text="Username" 
 FontSize="22" FontFamily="Segoe WP Semibold">
                     <TextBlock.Foreground>
                           <SolidColorBrush 
 Color="{StaticResource PhoneAccentColor}"/>
                     TextBlock.Foreground>
                TextBlock>
                    <TextBox x:Name="txtUsername" Height="83" 
Text="atneik@yahoo.com" />
                <toolkit:ListPicker Header="Email Provider">
                    <toolkit:ListPickerItem Content="Gmail.com" 
  Foreground="Red"/>
                    <toolkit:ListPickerItem Content="Hotmail.com" 
 Foreground="Blue"  />
                    <toolkit:ListPickerItem Content="Facebook.com" 
 Foreground="Green" />
                    <toolkit:ListPickerItem 
 Content="Yahoo.com"  Foreground="Purple"/>
                toolkit:ListPicker>
                <TextBlock x:Name="tbLable2" 
 Text="Password" FontSize="22" FontFamily="Segoe WP Semibold">
                     <TextBlock.Foreground>
                           <SolidColorBrush 
 Color="{StaticResource PhoneAccentColor}"/>
                     TextBlock.Foreground>TextBlock>
                <PasswordBox Height="72" 
Name="txtpassword" Width="460" Password="STWVxEITy"/>
                
                <Button x:Name="btnLogin" 
Content="login" Height="71" Width="180" Margin="144,0"/>
                <Rectangle Height="10" />
                <toolkit:ToggleSwitch Header="Remember Me" Height="116" Name="tglSwittch" Width="456" Content="Yes" IsChecked="True" Visibility="Collapsed" />
            StackPanel>
            <StackPanel x:Name="stckWait" 
 Background="Black" Opacity="0.8" 
VerticalAlignment="Center" Width="480" Height="768" Visibility="Collapsed">
                <Rectangle Height="300"/>
                <TextBlock Text="Please Wait 
While We Authenticate Credentials" 
 HorizontalAlignment="Center" TextAlignment="Center" 
VerticalAlignment="Center" Foreground="White" />
                <Rectangle Height="20"/>
                <toolkit:PerformanceProgressBar 
 Name="ProgressBar1" IsEnabled="True" 
 IsIndeterminate="True" Foreground="White"/>
                <Rectangle Height="80"/>
            StackPanel>
        Grid>
    Grid>
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" Opacity="0.5">
            <shell:ApplicationBarIconButton IconUri="/icons/appbar.feature.settings.rest.png" Text="Settings"/>
            <shell:ApplicationBarIconButton IconUri="/icons/appbar.questionmark.rest.png" Text="Help"/>
        shell:ApplicationBar>
    phone:PhoneApplicationPage.ApplicationBar>
phone:PhoneApplicationPage>
 
 

No comments:

Post a Comment