-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathChangePriceDialog.xaml
More file actions
114 lines (110 loc) · 6.11 KB
/
ChangePriceDialog.xaml
File metadata and controls
114 lines (110 loc) · 6.11 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
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
<Window x:Class="FlamyPOS.ChangePriceDialog"
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:FlamyPOS"
xmlns:util="clr-namespace:FlamyPOS.Utilities"
mc:Ignorable="d"
Title="ChangePriceDialog"
WindowStartupLocation="CenterScreen"
WindowStyle="None" AllowsTransparency="True" ResizeMode="CanResizeWithGrip"
Height="675" Width="500">
<Window.Triggers>
<EventTrigger RoutedEvent="Window.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Duration="0:0:.2" Storyboard.TargetProperty="Opacity" From="0" To="1.0"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Window.Triggers>
<Window.Resources>
<Style x:Key="textLabel" TargetType="{x:Type Label}">
<Setter Property="FontSize" Value="24"/>
<Setter Property="Foreground" Value="Gray"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
</Window.Resources>
<Border BorderBrush="Black" BorderThickness="1">
<Grid Background="#e8eaf6">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label Height="15" Background="#006db3"/>
<Label Grid.Row="1" Background="#039be5" Foreground="White" FontSize="26" HorizontalContentAlignment="Center">Change Price</Label>
<Grid Grid.Row="2">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.ColumnSpan="2"
Style="{StaticResource textLabel}"
FontWeight="Medium"
Content="{Binding SelectedItem.Name}"
ContentStringFormat="Item Selected: {0}"/>
<Label Grid.Row="1"
Style="{StaticResource textLabel}"
Content="Current Price:"/>
<Label Grid.Row="1" Grid.Column="1"
FontSize="20"
MinHeight="40"
Content="{Binding CurrentPrice}"
ContentStringFormat="RM {0}"
Background="LightGray"
Margin="10" Padding="10"
VerticalContentAlignment="Center"
HorizontalContentAlignment="Center"/>
<Label Grid.Row="2" Style="{StaticResource textLabel}">Enter New Price: </Label>
<Label x:Name="txtBox"
FontSize="20"
MinHeight="40"
Background="LightGray"
Content="{Binding NewPrice}"
Grid.Row="2" Grid.Column="2"
Margin="10" Padding="10"
VerticalContentAlignment="Center"
HorizontalContentAlignment="Center">
</Label>
</Grid>
<StackPanel Grid.Row="3" Orientation="Vertical" HorizontalAlignment="Center" Margin="5">
<WrapPanel>
<Button Style="{StaticResource numberButton}" Command="{Binding NumberBtnClickCommand}" CommandParameter="7">7</Button>
<Button Style="{StaticResource numberButton}" Command="{Binding NumberBtnClickCommand}" CommandParameter="8">8</Button>
<Button Style="{StaticResource numberButton}" Command="{Binding NumberBtnClickCommand}" CommandParameter="9">9</Button>
</WrapPanel>
<WrapPanel>
<Button Style="{StaticResource numberButton}" Command="{Binding NumberBtnClickCommand}" CommandParameter="4">4</Button>
<Button Style="{StaticResource numberButton}" Command="{Binding NumberBtnClickCommand}" CommandParameter="5">5</Button>
<Button Style="{StaticResource numberButton}" Command="{Binding NumberBtnClickCommand}" CommandParameter="6">6</Button>
</WrapPanel>
<WrapPanel>
<Button Style="{StaticResource numberButton}" Command="{Binding NumberBtnClickCommand}" CommandParameter="1">1</Button>
<Button Style="{StaticResource numberButton}" Command="{Binding NumberBtnClickCommand}" CommandParameter="2">2</Button>
<Button Style="{StaticResource numberButton}" Command="{Binding NumberBtnClickCommand}" CommandParameter="3">3</Button>
</WrapPanel>
<WrapPanel>
<Button Style="{StaticResource numberButton}" Command="{Binding NumberBtnClickCommand}" CommandParameter="C">C</Button>
<Button Style="{StaticResource numberButton}" Command="{Binding NumberBtnClickCommand}" CommandParameter="0">0</Button>
<Button Style="{StaticResource numberButton}" Command="{Binding NumberBtnClickCommand}" CommandParameter=".7">.</Button>
</WrapPanel>
</StackPanel>
<StackPanel Grid.Row="4" Orientation="Vertical">
<Button Command="{Binding ConfirmPriceChangeCommand}"
Height="30" Style="{StaticResource confirmBtn}">Confirm</Button>
<Button Click="Button_Click_1"
Height="30" Style="{StaticResource cancelBtn}">Cancel</Button>
</StackPanel>
</Grid>
</Border>
</Window>