-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
135 lines (124 loc) · 7.39 KB
/
Copy pathMainWindow.xaml
File metadata and controls
135 lines (124 loc) · 7.39 KB
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<Window x:Class="TodoList.MainWindow"
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:TodoList"
xmlns:ViewModel="clr-namespace:TodoList.ViewModels"
mc:Ignorable="d"
Title="MainWindow" Height="800" Width="600">
<Window.DataContext>
<ViewModel:MainVM></ViewModel:MainVM>
</Window.DataContext>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition Width="3*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition Height="12*"></RowDefinition>
</Grid.RowDefinitions>
<Label FontSize="34" FontWeight="Bold"
HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
Foreground="White" Background="#4e92ce">TodoList</Label>
<Label Grid.Column="1" Background="#4e92ce"></Label>
<StackPanel Grid.Row="1">
<Button Command="{Binding HideTodos, UpdateSourceTrigger=PropertyChanged}"
Background="White" BorderBrush="White" HorizontalContentAlignment="Center" Height="50">
<StackPanel Orientation="Horizontal">
<Image Source="/../Images/home.png"></Image>
<Label FontSize="22"
VerticalContentAlignment="Center">Home</Label>
</StackPanel>
</Button>
<Button Command="{Binding ShowTodos, UpdateSourceTrigger=PropertyChanged}"
Background="White" BorderBrush="White" HorizontalContentAlignment="Center" Height="50">
<StackPanel Orientation="Horizontal">
<Image Source="/../Images/list.png"></Image>
<Label FontSize="22"
VerticalContentAlignment="Center">Todos</Label>
</StackPanel>
</Button>
<Button Command="{Binding HideTodos, UpdateSourceTrigger=PropertyChanged}"
Background="White" BorderBrush="White" HorizontalContentAlignment="Center" Height="50">
<StackPanel Orientation="Horizontal">
<Image Source="/../Images/info.png"></Image>
<Label FontSize="22"
VerticalContentAlignment="Center">About</Label>
</StackPanel>
</Button>
</StackPanel>
<StackPanel Visibility="{Binding TodosVisibility, UpdateSourceTrigger=PropertyChanged}" Grid.Row="1" Grid.Column="1">
<Button Command="{Binding AddTodosMenu, UpdateSourceTrigger=PropertyChanged}" BorderBrush="White" Width="50" HorizontalAlignment="Right" Background="White">
<Image Height="50" Source="/../Images/file.png" HorizontalAlignment="Right"></Image>
</Button>
<TextBox Text="{Binding Find, UpdateSourceTrigger=PropertyChanged}"
FontSize="24"></TextBox>
<Label HorizontalAlignment="Center" FontSize="32" FontWeight="Bold">Todos</Label>
<ListBox HorizontalContentAlignment="Stretch"
ItemsSource="{Binding Todos, UpdateSourceTrigger=PropertyChanged}"
BorderBrush="White">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="10*"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
</Grid.ColumnDefinitions>
<CheckBox Grid.Column="0"
IsChecked="{Binding IsDone, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
HorizontalAlignment="Left" VerticalAlignment="Center"></CheckBox>
<Label Grid.Column="1" FontSize="20"
Content="{Binding Header, UpdateSourceTrigger=PropertyChanged}"></Label>
<Button Grid.Column="2"
Command="{Binding Edit, UpdateSourceTrigger=PropertyChanged}"
Background="White" BorderBrush="White">
<Image Height="25" Source="/../Images/edit.png"></Image>
</Button>
<Button Grid.Column="3"
Command="{Binding Delete, UpdateSourceTrigger=PropertyChanged}"
Background="White" BorderBrush="White">
<Image Height="25" Source="/../Images/delete.png"></Image>
</Button>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Label HorizontalAlignment="Center" FontSize="32" FontWeight="Bold">Finished</Label>
<ListBox HorizontalContentAlignment="Stretch"
ItemsSource="{Binding Finished, UpdateSourceTrigger=PropertyChanged}"
BorderBrush="White">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="10*"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
</Grid.ColumnDefinitions>
<CheckBox Grid.Column="0"
IsChecked="{Binding IsDone, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
HorizontalAlignment="Left" VerticalAlignment="Center"></CheckBox>
<Label Grid.Column="1" FontSize="20"
HorizontalAlignment="Left" Content="{Binding Header, UpdateSourceTrigger=PropertyChanged}"></Label>
<Button Grid.Column="2"
Command="{Binding Edit, UpdateSourceTrigger=PropertyChanged}"
Background="White" BorderBrush="White">
<Image Height="25" Source="/../Images/edit.png"></Image>
</Button>
<Button Grid.Column="3"
Command="{Binding Delete, UpdateSourceTrigger=PropertyChanged}"
Background="White" BorderBrush="White">
<Image Height="25" Source="/../Images/delete.png"></Image>
</Button>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
</Grid>
</Window>