-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindowStudent.xaml
118 lines (109 loc) · 6.89 KB
/
MainWindowStudent.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
<Window x:Class="TeachersMate.MainWindowStudent"
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:TeachersMate"
mc:Ignorable="d"
Title="MainWindow" Height="556" Width="1000" WindowStartupLocation="CenterScreen" Icon="/iconTeachersMate.png">
<Window.Resources>
<Style TargetType="Image">
<Setter Property="Width" Value="40"/>
<Setter Property="Height" Value="40"/>
<Setter Property="Margin" Value="10"/>
</Style>
<Style TargetType="Label">
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Foreground" Value="#F2E5E5"/>
</Style>
<Style TargetType="Button">
<Setter Property="Height" Value="75"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup Name="CommonStates">
<VisualState Name="Normal"/>
<VisualState Name="MouseOver">
<Storyboard>
<ColorAnimation Storyboard.TargetName="BackgroundGradient"
Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)"
To="#D38D8D" Duration="0:0:0.1"/>
</Storyboard>
</VisualState>
<VisualState Name="Pressed">
<Storyboard>
<ColorAnimation Storyboard.TargetName="BackgroundGradient"
Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)"
To="#D38D8D" Duration="0:0:0.1"/>
</Storyboard>
</VisualState>
<VisualState Name="Disabled">
<Storyboard>
<ColorAnimation Storyboard.TargetName="BackgroundGradient"
Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)"
To="#E8C4C4" Duration="0"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Border x:Name="BackgroundGradient" BorderBrush="#CE7777" BorderThickness=".5">
<Border.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="#D38D8D" Offset="0"/>
<GradientStop Color="#D38D8D" Offset=".5"/>
</LinearGradientBrush>
</Border.Background>
</Border>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" TextBlock.Foreground="#FF000000"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid Background="#F2E5E5" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="Hello, " FontSize="45" HorizontalAlignment="Center" VerticalAlignment="Center" FontStyle="Italic" Foreground="#E8C4C4" Name="txtbx_gretg"/>
<TextBlock FontSize="45" HorizontalAlignment="Center" VerticalAlignment="Center" FontStyle="Italic" Foreground="#E8C4C4" Name="txtbx_greeting"/>
<TextBlock Text="!" FontSize="45" HorizontalAlignment="Center" VerticalAlignment="Center" FontStyle="Italic" Foreground="#E8C4C4"/>
</StackPanel>
<Frame Grid.Row="0" HorizontalAlignment="Center" Name="MainFrame" Margin="35,0,0,0" NavigationUIVisibility="Hidden" Grid.Column="0"
Width="{Binding Path=ActualWidth, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}"/>
<StackPanel Grid.Column="0" Width="74" HorizontalAlignment="Left" VerticalAlignment="Stretch" Name="StackPanelBar" Background="#CE7777"
Height="{Binding Path=ActualHeight, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}">
<StackPanel.Triggers>
<EventTrigger RoutedEvent="MouseEnter">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="StackPanelBar" Storyboard.TargetProperty="(Button.Width)" To="190" Duration="0:0:.3"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
<EventTrigger RoutedEvent="MouseLeave">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="StackPanelBar" Storyboard.TargetProperty="(Button.Width)" To="74" Duration="0:0:.3"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</StackPanel.Triggers>
<Button Name="btn_Homework" VerticalAlignment="Center" Click="Click_BtnHomework">
<DockPanel Width="180" Margin="7,0,0,0">
<Image Source="tests.png"/>
<Label Content="Homework" Foreground="Black" FontWeight="SemiBold" FontSize="13" Margin="10,0,0,0"/>
</DockPanel>
</Button>
<Button Name="btn_Exit" VerticalAlignment="Center" Click="Click_Exit">
<DockPanel Width="180" Margin="7,0,0,0">
<Image Source="exit.png"/>
<Label Content="Exit" Foreground="Black" FontWeight="DemiBold" FontSize="13" Margin="10,0,0,0"/>
</DockPanel>
</Button>
</StackPanel>
</Grid>
</Window>