-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
74 lines (61 loc) · 3.6 KB
/
MainWindow.xaml
File metadata and controls
74 lines (61 loc) · 3.6 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
<Window x:Class="TASKIFY.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:TASKIFY"
mc:Ignorable="d"
Height="450" Width="600" Background="#141625">
<Border Padding="80 20">
<StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="TASKIFY" Foreground="White" FontWeight="Bold" FontSize="20"/>
<Button Grid.Column="1" Content="Add Task" Foreground="White" Background="#7C5DFA" Click="Button_Click">
<Button.Resources>
<Style TargetType="Border">
<Setter Property="CornerRadius" Value="15"/>
<Setter Property="Padding" Value="5"/>
</Style>
</Button.Resources>
</Button>
</Grid>
<ListBox x:Name="taskListBox" Background="#1E2139" BorderThickness="0" MouseDoubleClick="TaskListBox_MouseDoubleClick" Margin="0 20">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Background="#1E2139" Margin="0 5" >
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding title}" Foreground="White" Padding="5 5"/>
<TextBlock Grid.Column="1" Text="{Binding description}" Foreground="White" Padding="5 5"/>
<Label Grid.Column="2">
<Label.Style>
<Style TargetType="Label">
<Setter Property="Content" Value="Not Complete"/>
<Setter Property="Foreground" Value="Red"/>
<Style.Triggers>
<DataTrigger Binding="{Binding is_complete}" Value="True">
<Setter Property="Content" Value="Completed"/>
<Setter Property="Foreground" Value="Green"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Label.Style>
</Label>
<Button Grid.Column="3" Content="delete" Foreground="white" Background="red" Click="Delete_Button_Click" Tag="{Binding id}" Margin="5 0"/>
<Button Grid.Column="4" Content="update" Foreground="white" Background="blue" Click="Open_Update_Window" Tag="{Binding id}" Margin="5 0"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
</Border>
</Window>