Skip to main content

Microsoft Silverlight

Answered Question Any tutorial on Log In Page?RSS Feed

(0)

apprentice23
apprenti...

Member

Member

0 points

7 Posts

Any tutorial on Log In Page?

Is there any sites where by i can study and follow for log in page? Im using visual studio, C# and blend 2, silverlight 2.0. Appreciate your help. Thanks.

varshavmane
varshavmane

Contributor

Contributor

6723 points

1,580 Posts

Answered Question

Re: Any tutorial on Log In Page?

Hi,

Check this:

http://pendsevikram.blogspot.com/2009/01/silverlight-2-maintain-data-in-session.html

For creating Login control:

Xaml code:

<UserControl x:Class="Silverlight1.Login"

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

mc:Ignorable="d"

x:Name="login">

<Grid x:Name="LayoutRoot" VerticalAlignment="Center" Background="White" ShowGridLines="True" Width="1024">

<Canvas Margin="0" Width="1000" Height="500" x:Name="Authorized">

<Border CornerRadius="8,8,0,0" Width="800" Background="#FF292984" Canvas.Top="80" Canvas.Left="98" Height="25"></Border>

<Border Background="#FFBFC6CC" Height="350" Canvas.Left="98" Canvas.Top="105" Width="3" BorderThickness="0,0,0,0" CornerRadius="0,0,0,5"></Border>

<Border Background="#FFBFC6CC" Height="350" Canvas.Left="895" Canvas.Top="105" Width="3" CornerRadius="0,0,5,0"></Border>

<Border Background="#FFBFC6CC" Height="3" CornerRadius="0,0,5,5" Canvas.Left="98" Canvas.Top="452" Width="800"></Border>

<StackPanel Orientation="Horizontal">

<Canvas Margin="0" Height="200" VerticalAlignment="Center" HorizontalAlignment="Center">

<Rectangle Width="330" Height="205" RadiusX="7" RadiusY="7" Fill="#44888888" Canvas.Top="178" Canvas.Left="325" />

<Rectangle Canvas.Left="327" Canvas.Top="181" Width="326" Height="199" RadiusX="5" RadiusY="5" StrokeThickness="1" Stroke="#888888">

<Rectangle.Fill>

<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">

<GradientStop Color="#ffdfdfdf" Offset="0.0" />

<GradientStop Color="#fff8f8f8" Offset="0.7" />

<GradientStop Color="#ffeeeeee" Offset="1.0" />

</LinearGradientBrush>

</Rectangle.Fill>

</Rectangle>

<TextBlock x:Name="lblControlTitle" Text="Sign In to IndigoHealthcare" Canvas.Left="406" Canvas.Top="194" Height="14" Width="180" FontFamily="Arial" FontSize="12" FontWeight="Bold" Foreground="#FF2F3752" />

<TextBlock Text="Username:" Canvas.Left="348" Canvas.Top="226" Height="14" Width="69" FontFamily="Arial" FontSize="12" FontWeight="Normal" Foreground="#FF2F3752" />

<TextBox x:Name="txtUserName" Canvas.Left="440" Canvas.Top="223" Width="185" TabIndex="0" Height="22" />

<TextBlock Text="Password:" Canvas.Left="348" Canvas.Top="263" FontFamily="Arial" FontSize="12" FontWeight="Normal" Foreground="#FF2F3752" Height="14" Width="67" />

<PasswordBox Canvas.Left="440" PasswordChar="*" Canvas.Top="260" x:Name="txtPassword" Height="22" Width="186" TabIndex="2" />

<CheckBox x:Name="chkRemember" Canvas.Left="406" Canvas.Top="292" Width="218" TabIndex="2" Height="20" Content="Remember me on this computer"/>

<CheckBox x:Name="chkKeepMeLoggedOn" Canvas.Left="406" Canvas.Top="318" Width="218" TabIndex="2" Height="20" Content="Keep Me Logged In"/>

<Button x:Name="btnLogin" Click="btnLogin_Click" Canvas.Left="440" Canvas.Top="347" Width="55" Content="Login" Height="21" />

<Button Canvas.Left="525" Canvas.Top="347" Width="55" Content="Cancel" Height="21" />

</Canvas>

</StackPanel>

</Canvas>

</Grid>

</UserControl>

For storing you could store a credentials.xml file in isolated storage with information like, username, password, expiration date, remember me, etc. And if the file does not exist, create them like this is the first time they are logging in.

HTH Smile

Please "Mark as Answer" if this post answered your question. :)
Visit my Blog: http://varshavmane.blogspot.com/

Jonathan Shen – MSFT
Jonathan...

All-Star

All-Star

24939 points

2,425 Posts

Microsoft
Answered Question

Re: Any tutorial on Log In Page?

Hi Apprentice23,

Also, you can get the a working sample here.

Best regards,

Jonathan

Jonathan Shen
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

apprentice23
apprenti...

Member

Member

0 points

7 Posts

Re: Re: Any tutorial on Log In Page?

Hello, Thanks for the reply. I went to the website but I have no idea which link should i click and download?

Jonathan Shen – MSFT
Jonathan...

All-Star

All-Star

24939 points

2,425 Posts

Microsoft

Re: Re: Any tutorial on Log In Page?

Hi,

You'd better download the HRAppCS_WithAuthentication or HRAppVB_WithAuthentication.  Thanks.

Best regards,

Jonathan

Jonathan Shen
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities