-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathListBooks.page.xaml
More file actions
82 lines (74 loc) · 4.56 KB
/
ListBooks.page.xaml
File metadata and controls
82 lines (74 loc) · 4.56 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
<Page x:Class="Library_DB.ListBooks"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:local="clr-namespace:Library_DB"
mc:Ignorable="d"
d:DesignHeight="650" d:DesignWidth="420"
Title="ListBooks">
<Grid Background="#FF35291B">
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!--Lista Över Böcker-->
<StackPanel Grid.Row="2">
<DataGrid ItemsSource="{Binding}" x:Name="BooksGrid"
SelectedItem="{Binding Path=Selected, Mode=TwoWay}" CanUserDeleteRows="True"
Style="{DynamicResource DataGridStyle1}"
CellStyle="{DynamicResource DataGridCellStyle1}"
ColumnHeaderStyle="{DynamicResource DataGridColumnHeaderStyle1}"
RowStyle="{DynamicResource DataGridRowStyle1}"
Margin="10,0,10,30" Height="320" AutoGenerateColumns="False"
Background="{x:Null}" BorderBrush="#FF566448" SelectionChanged="grid_SelectionChanged">
<!--Design Style-->
<!--Header Design-->
<DataGrid.Columns>
<DataGridCheckBoxColumn Width="30" CanUserResize="False">
<DataGridCheckBoxColumn.HeaderTemplate>
<DataTemplate>
<materialDesign:PackIcon Margin="5,0,0,0" Kind="Checkbook"/>
</DataTemplate>
</DataGridCheckBoxColumn.HeaderTemplate>
</DataGridCheckBoxColumn>
<DataGridTextColumn Binding="{Binding idBooks}" Header=" ID" IsReadOnly="True" Width="26" CanUserResize="False"/>
<DataGridTextColumn Binding="{Binding book_title}" Width="*" Header= " Book Title" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding page_amount}" Width="45" Header="Pages" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding Author_name}" Width="*" Header=" Author" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding Favorits_id}" Width="45" Header="Favo" IsReadOnly="True"/>
<!--<DataGridTextColumn Binding="{Binding category_id}" Width="*" Header="Category" IsReadOnly="True"/>
<DataGridTextColumn Binding="{Binding idLanguages}" Width="*" Header="Language" IsReadOnly="True"/>-->
</DataGrid.Columns>
</DataGrid>
</StackPanel>
<!-- Display -->
<StackPanel Grid.Row="1">
<Image Width="100" Height="150" Margin="0,20,0,0" Source="/Resources/Images/icon4.png" ></Image>
<TextBlock Name="listBooksTB1" Margin="0,0,0,30" VerticalAlignment="Bottom"
FontSize="18" FontFamily="Century Gothic" Foreground="White"
Text="BOOK TITEL" TextAlignment="Center">
</TextBlock>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="-20,-20,30,5">
<!--delete Button-->
<Button x:Name="delButton" IsEnabled="False"
Background="#FF5F731D" Style="{DynamicResource roundButton}" Margin="0,0,10,0"
ToolTip="Delete book" Click="DeleteData_click" >
<materialDesign:PackIcon Kind="Delete" Width="22" Height="25" Background="{x:Null}" Foreground="White" />
</Button>
<!--delete Button-->
<!--update Button-->
<Button x:Name="UpdateBtn" IsEnabled="False"
Background="#FF5F731D" Style="{DynamicResource roundButton}"
ToolTip="Update book"
Focusable="False" Click="updateData_click">
<materialDesign:PackIcon Kind="Update" Foreground="White" />
</Button>
<!--update Button-->
</StackPanel>
</StackPanel>
<Frame x:Name="Frame" Grid.RowSpan="3" Width="auto" Height="auto" Grid.Row="0" />
</Grid>
</Page>