-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
59 lines (49 loc) · 3.72 KB
/
MainWindow.xaml
File metadata and controls
59 lines (49 loc) · 3.72 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
<Window x:Class="Project01.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:Project01"
mc:Ignorable="d"
WindowStartupLocation="CenterScreen"
Title="MainWindow" Height="450" Width="800">
<Window.DataContext>
<local:MainWindowVM/>
</Window.DataContext>
<Grid>
<StackPanel Width="800" Height="100"
VerticalAlignment="Bottom"
Background="Gray" Orientation="Horizontal">
<Button Content="Add Student" Command="{Binding AddStudentCommand}" Style="{StaticResource mainbutten}" Width="136" Foreground="Turquoise" FontWeight="Bold"/>
<Button Content="Edit Student Student" Style="{StaticResource mainbutten}" Foreground="Turquoise" FontWeight="Bold" Command="{Binding ExecuteEditStudentCommandCommand}" Click="Button_Click" Width="177"/>
<Button Content="Delete Student" Style="{StaticResource mainbutten}" Foreground="Turquoise" FontWeight="Bold" Command="{Binding DeleteCommand}" Width="138"/>
</StackPanel>
<StackPanel Height="335" Background="NavajoWhite" VerticalAlignment="Top" Orientation="Vertical" >
<StackPanel Margin=" 40 0 0 0" HorizontalAlignment="Left" Width="600" Background="Transparent" Orientation="Horizontal" >
<TextBlock Text="FirstName" Foreground="Purple" Style="{StaticResource ListView}" />
<TextBlock Text="LastName" Foreground="Purple" Style="{StaticResource ListView}" />
<TextBlock Text="Age" Foreground="Purple" Style="{StaticResource ListView}" />
<TextBlock Text="DataOfBirth" Foreground="Purple" Style="{StaticResource ListView}" />
<TextBlock Text="Gpa" Foreground="Purple" Style="{StaticResource ListView}" />
</StackPanel>
<ListView x:Name="Listview" Margin="0 20 0 0" Background="Transparent" Height="280" ItemsSource="{Binding Users,UpdateSourceTrigger=PropertyChanged}"
SelectedItem="{Binding SelectedUser,UpdateSourceTrigger=PropertyChanged}" SelectionChanged="Listview_SelectionChanged_1">
<ListView.ItemTemplate >
<DataTemplate>
<Border Background="Transparent" BorderBrush="Black" BorderThickness="1"
Padding="0.1" CornerRadius="5" Width="600" Height="35" >
<StackPanel Width="600" Background="Transparent" Orientation="Horizontal" >
<Image Width="30" Height="30" Margin="1" Source="{Binding Image}" />
<TextBlock Text="{Binding FirstName,UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource ListView}" />
<TextBlock Text="{Binding LastName,UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource ListView}" />
<TextBlock Text="{Binding Age,UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource ListView}" />
<TextBlock Text="{Binding DateOfBirth,UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource ListView}" />
<TextBlock Text="{Binding Gpa,UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource ListView}" />
</StackPanel>
</Border>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackPanel>
</Grid>
</Window>