-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.xaml
More file actions
45 lines (45 loc) · 2.83 KB
/
App.xaml
File metadata and controls
45 lines (45 loc) · 2.83 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
<Application x:Class="CRUDApp.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:CRUDApp" StartupUri="MainWindow.xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" d1p1:Ignorable="d" xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:vm="clr-namespace:CRUDApp.ViewModel">
<Application.Resources>
<ResourceDictionary>
<vm:ViewModelLocator x:Key="Locator" d:IsDataSource="True" />
<DataTemplate x:Key="HomeworkListViewItemTemplate">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30" />
<ColumnDefinition />
<ColumnDefinition Width="50" />
<ColumnDefinition Width="12" />
<ColumnDefinition Width="50" />
</Grid.ColumnDefinitions>
<CheckBox IsChecked="{Binding Completed, Mode=TwoWay}" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="7.012,18.41" />
<StackPanel Grid.Column="1">
<Label Content="{Binding Course}" />
<Label Content="{Binding Summary}" />
</StackPanel>
<Button Grid.Column="2" Content="" Command="{Binding HomeworkViewModel.EditHomeworkCommand, Source={StaticResource Locator}}" CommandParameter="{Binding Guid}" Style="{DynamicResource SegoeMDL2ButtonStyle}" />
<Button Grid.Column="4" Content="" Command="{Binding HomeworkViewModel.DeleteHomeworkCommand, Source={StaticResource Locator}}" CommandParameter="{Binding Guid}" Style="{DynamicResource SegoeMDL2ButtonStyle}" />
</Grid>
</DataTemplate>
<SolidColorBrush x:Key="AppBackgroundColor">White</SolidColorBrush>
<SolidColorBrush x:Key="AppListBackgroundColor">#FFF9F9F9</SolidColorBrush>
<SolidColorBrush x:Key="HomeworkPopupBorderBrush">#7F686868</SolidColorBrush>
<Style x:Key="HomeworkEditPopupStyle" TargetType="Border">
<Setter Property="BorderBrush" Value="{DynamicResource HomeworkPopupBorderBrush}" />
<Setter Property="BorderThickness" Value="12" />
<Setter Property="Background" Value="{DynamicResource AppBackgroundColor}" />
</Style>
<Style x:Key="AppButtonStyle" TargetType="Button">
<Setter Property="Padding" Value="16,4" />
</Style>
<Style x:Key="HomeworkTextboxStyle" TargetType="TextBox">
<Setter Property="Margin" Value="12,0,12,12" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="MinHeight" Value="30" />
</Style>
<Style x:Key="SegoeMDL2ButtonStyle" TargetType="Button">
<Setter Property="FontFamily" Value="Segoe MDL2 Assets" />
<Setter Property="Padding" Value="16,4" />
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>