/
Settings.xaml
82 lines (72 loc) · 3.93 KB
/
Settings.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<phone:PhoneApplicationPage
x:Class="ToDelicious.Settings"
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"
shell:SystemTray.IsVisible="True">
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!--TitlePanel contains the name of the application and page title-->
<StackPanel Grid.Row="0" Margin="12,17,0,28">
<TextBlock Text="SEND TO DELICIOUS"
Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock Text="user settings" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>
<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<StackPanel>
<Grid x:Name="usernameFields">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="username: " VerticalAlignment="Center" />
<TextBox x:Name="usernameText"
Grid.Column="1" Text="{Binding username, Mode=TwoWay}"/>
</Grid>
<!-- should only be visible if we do not have a saved username and password, use boolean visibilty converter -->
<Grid x:Name="passwordFields">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="password: " VerticalAlignment="Center" />
<PasswordBox x:Name="passwordText"
Grid.Column="1" />
</Grid>
<!-- should only be visible if we have a saved username and password, use boolean visibilty converter -->
<Button x:Name="buttonClearStorage"
Content="Delete saved account details"
HorizontalAlignment="Stretch"
Click="ConnectButton_Click"
Visibility="{Binding hasAccount, Converter={StaticResource BooleanVisibility}}"
/>
<!-- should only be visible if we do not currently have -->
<Button x:Name="buttonConnect"
Content="Save account details"
HorizontalAlignment="STretch"
Click="ConnectButton_Click"
Visibility="{Binding hasAccount, Converter={StaticResource BooleanInVisibility}}"
/>
<StackPanel>
<TextBlock Text="Don't have an account?" HorizontalAlignment="Center"/>
<HyperlinkButton Content="Create one at delicious.com"
TargetName="_blank"
NavigateUri="http:\\www.delicious.com"/>
</StackPanel>
</StackPanel>
</Grid>
</Grid>
</phone:PhoneApplicationPage>