-
Notifications
You must be signed in to change notification settings - Fork 0
/
Menu.xaml
72 lines (69 loc) · 3.97 KB
/
Menu.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
<UserControl x:Class="Utltahack.Menu"
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:local="clr-namespace:Utltahack"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<ListView x:Name="MyListView" ItemsSource="{Binding myInvoices}" SelectionChanged="MyListView_SelectionChanged">
<ListView.Resources>
<Style TargetType="{x:Type ListViewItem}">
<Style.Triggers>
<DataTrigger Binding="{Binding Priority}"
Value="1">
<Setter Property="Background"
Value="OrangeRed" />
</DataTrigger>
<DataTrigger Binding="{Binding Priority}"
Value="2">
<Setter Property="Background"
Value="Orange" />
</DataTrigger>
<DataTrigger Binding="{Binding Priority}"
Value="3">
<Setter Property="Background"
Value="LightYellow" />
</DataTrigger>
<DataTrigger Binding="{Binding Priority}"
Value="4">
<Setter Property="Background"
Value="LightGreen" />
</DataTrigger>
<DataTrigger Binding="{Binding Priority}"
Value="5">
<Setter Property="Background"
Value="LightBlue" />
</DataTrigger>
</Style.Triggers>
</Style>
</ListView.Resources>
<ListView.View>
<GridView>
<GridViewColumn DisplayMemberBinding="{Binding Priority }" Header="Priority" Width ="Auto"></GridViewColumn>
<GridViewColumn DisplayMemberBinding="{Binding Name }" Header="Name" Width ="Auto"></GridViewColumn>
<GridViewColumn DisplayMemberBinding="{Binding Category }" Header="Category" Width ="Auto"></GridViewColumn>
<GridViewColumn DisplayMemberBinding="{Binding Amount }" Header="Amount" Width ="Auto"></GridViewColumn>
<GridViewColumn DisplayMemberBinding="{Binding Currency }" Header="Currency" Width ="Auto"></GridViewColumn>
<GridViewColumn DisplayMemberBinding="{Binding Issuedate }" Header="Issue date" Width ="Auto"></GridViewColumn>
<GridViewColumn DisplayMemberBinding="{Binding Duedate }" Header="Due date" Width ="Auto"></GridViewColumn>
<GridViewColumn DisplayMemberBinding="{Binding recomended_date }" Header="Recomended payment date" Width ="Auto"></GridViewColumn>
<GridViewColumn x:Name="gridClm_SelectRow" Header="Payment" Width="Auto">
<GridViewColumn.CellTemplate>
<DataTemplate>
<Button x:Name="btnDelete"
Tag="{Binding ID}"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Click="btnDelete_Click" >
Pay Invoice
</Button>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
</Grid>
</UserControl>