-
Notifications
You must be signed in to change notification settings - Fork 0
/
EditGoal.xaml
121 lines (121 loc) · 6.36 KB
/
EditGoal.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<Window x:Class="Goalie.EditGoal"
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"
xmlns:local="clr-namespace:Goalie"
mc:Ignorable="d"
WindowStartupLocation="CenterOwner"
ResizeMode="NoResize"
ShowInTaskbar="False"
Title="Edit Goal" Height="450" Width="800">
<Window.Resources>
<GridLength x:Key="LabelSize">120</GridLength>
<Style TargetType="TextBlock" x:Key="FormLabel">
<Setter Property="Margin" Value="10 10 5 10"/>
<Setter Property="TextAlignment" Value="Right"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Foreground" Value="{StaticResource SoftControlForeground}"/>
</Style>
<Style TargetType="TextBox" x:Key="FormTextBox" BasedOn="{StaticResource TextBoxBase}">
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Width" Value="200"/>
<Setter Property="Margin" Value="5 10 10 10"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
</Style>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition Height="*"/>
<RowDefinition Height="50"/>
</Grid.RowDefinitions>
<StackPanel Background="{StaticResource GoalieGreen}">
<TextBlock VerticalAlignment="Center"
FontSize="24"
Margin="10"
Foreground="{StaticResource GoalieGreenContrast}"
x:Name="GoalLabel">Goal</TextBlock>
</StackPanel>
<ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
<StackPanel>
<Grid Margin="0 40 0 0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="{StaticResource LabelSize}"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Style="{StaticResource FormLabel}">Name:</TextBlock>
<TextBox Grid.Column="1" Style="{StaticResource FormTextBox}" x:Name="AccountName" Text="My New Goal"/>
</Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="{StaticResource LabelSize}"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Style="{StaticResource FormLabel}">Balance:</TextBlock>
<TextBox Grid.Column="1" Style="{StaticResource FormTextBox}" x:Name="InitialBalance" Text="$0.00"/>
</Grid>
<Grid x:Name="AmountPerPaycheck">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="{StaticResource LabelSize}"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Style="{StaticResource FormLabel}" TextWrapping="Wrap">Amount per paycheck:</TextBlock>
<StackPanel Orientation="Horizontal" Grid.Column="1">
<TextBox Grid.Column="1" Style="{StaticResource FormTextBox}" x:Name="SavingsAmount" Text="5"/>
<ComboBox x:Name="SavingsType"
Width="200"
VerticalAlignment="Center"
HorizontalAlignment="Left"
DisplayMemberPath="Key"
SelectedValuePath="Value"
Margin="5 0 0 0"
SelectedValue="0"/>
</StackPanel>
</Grid>
<Grid x:Name="GoalSettings">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="{StaticResource LabelSize}"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Style="{StaticResource FormLabel}">Goal (optional):</TextBlock>
<StackPanel Orientation="Horizontal" Grid.Column="1">
<TextBox Style="{StaticResource FormTextBox}" x:Name="Goal" Text="$0.00"/>
<TextBlock VerticalAlignment="Center">Leave this field blank or as $0 for no specific goal</TextBlock>
</StackPanel>
</Grid>
<Grid x:Name="ContinueSettings">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="{StaticResource LabelSize}"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Style="{StaticResource FormLabel}" TextWrapping="Wrap">Continue saving after goal met:</TextBlock>
<CheckBox Grid.Column="1"
x:Name="ContinueAfterGoalMet"
VerticalAlignment="Center"
HorizontalAlignment="Left"
Margin="5 0 0 0"
IsChecked="True"/>
</Grid>
</StackPanel>
</ScrollViewer>
<DockPanel Grid.Row="2" Background="{StaticResource VeryLightGray}">
<Button Style="{StaticResource DangerButton}"
x:Name="DeleteButton"
Width="100"
Height="30"
Margin="10 0"
Cursor="Hand" Click="DeleteButton_Click">Delete Goal</Button>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<Button Width="100"
Height="30"
Margin="0 0 10 0" Click="CloseButton_Click">Cancel</Button>
<Button Width="100"
Height="30"
Margin="0 0 10 0"
Style="{StaticResource ActionButton}"
Cursor="Hand" Click="Button_Click">Save</Button>
</StackPanel>
</DockPanel>
</Grid>
</Window>