-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
180 lines (164 loc) · 13.1 KB
/
MainWindow.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<Window x:Class="CurrencyConverter_Static.MainWindow"
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:CurrencyConverter_Static"
xmlns:fa="http://schemas.fontawesome.io/icons/"
mc:Ignorable="d"
Title="Currency Converter" SizeToContent="WidthAndHeight" MinHeight="500" MinWidth="1000" WindowStartupLocation="CenterScreen" >
<!--Icon="/Images/money.png"-->
<TabControl Name="tbMain" TabStripPlacement="Top">
<TabItem Name="tbConverter" Header="Currency Converter">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="60" ></RowDefinition>
<RowDefinition Height="80" ></RowDefinition>
<RowDefinition Height="150" ></RowDefinition>
<RowDefinition Height="100" ></RowDefinition>
<RowDefinition Height="150" ></RowDefinition>
</Grid.RowDefinitions>
<Border Grid.Row="2" Width="800" CornerRadius="10" BorderThickness="5">
<Border.BorderBrush>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0" >
<GradientStop Color="#ec2075" Offset="0.0" />
<GradientStop Color="#f33944" Offset="0.50" />
</LinearGradientBrush>
</Border.BorderBrush>
<Rectangle Grid.Row="2" >
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0" >
<GradientStop Color="#ec2075" Offset="0.0" />
<GradientStop Color="#f33944" Offset="0.50" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
</Border>
<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center" Height="50" Width="1000" VerticalAlignment="Center">
<Label Height="50" Width="1000" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Content="Currency Converter" FontSize="25" Foreground="#ec2075" FontWeight="Bold"></Label>
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Vertical" HorizontalAlignment="Center" Height="80" Width="1000">
<Label Height="40" Width="1000" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Content="Converted Currency" FontSize="20"></Label>
<Label Name="lblCurrency" Height="40" Width="1000" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontSize="20"></Label>
</StackPanel>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Top" Height="60" Width="800">
<Label Height="40" Width="150" Content="Enter Amount : " Margin="35 0 0 0" VerticalAlignment="Bottom" Foreground="White" FontSize="20"></Label>
<Label Height="40" Width="150" Content="From : " Margin="110 0 0 0" VerticalAlignment="Bottom" Foreground="White" FontSize="20"></Label>
<Label Height="40" Width="150" Content="To : " Margin="130 0 0 0" VerticalAlignment="Bottom" Foreground="White" FontSize="20"></Label>
</StackPanel>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" Height="90" Width="800" VerticalAlignment="Bottom">
<TextBox Name="txtCurrency" Width="200" Height="30" Margin="40 0 0 0" PreviewTextInput="NumberValidationTextBox" FontSize="18" VerticalContentAlignment="Center" VerticalAlignment="Top"></TextBox>
<ComboBox Name="cmbFromCurrency" Width="170" Height="30" Margin="60 0 40 0" FontSize="18" VerticalContentAlignment="Center" VerticalAlignment="Top" MaxDropDownHeight="150"></ComboBox>
<fa:ImageAwesome Icon="Exchange" Height="30" Width="30" Foreground="White" VerticalAlignment="Top"></fa:ImageAwesome>
<ComboBox Name="cmbToCurrency" Width="170" Height="30" Margin="40 0 0 0" FontSize="18" VerticalContentAlignment="Center" VerticalAlignment="Top" MaxDropDownHeight="150"></ComboBox>
</StackPanel>
<StackPanel Grid.Row="3" Height="100" Width="1000" Orientation="Horizontal">
<Button Name="Convert" Height="40" Width="150" Content="Convert" Click="Convert_Click" Margin="350 0 20 0" Foreground="White" FontSize="20" Style="{StaticResource ButtonRound}">
<Button.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Color="#ec2075" Offset="0.0"/>
<GradientStop Color="#f33944" Offset="0.5"/>
</LinearGradientBrush>
</Button.Background>
</Button>
<Button Name="Clear" Height="40" Width="150" Content="Clear" Click="Clear_Click" Foreground="White" FontSize="20" Style="{StaticResource ButtonRound}">
<Button.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Color="#ec2075" Offset="0.0"/>
<GradientStop Color="#f33944" Offset="0.5"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</StackPanel>
</Grid>
</TabItem>
<TabItem Name="tbConverterMaster" Header="Currency Master">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="60" ></RowDefinition>
<RowDefinition Height="100" ></RowDefinition>
<RowDefinition Height="60" ></RowDefinition>
<RowDefinition Height="200" ></RowDefinition>
<RowDefinition Height="150" ></RowDefinition>
</Grid.RowDefinitions>
<Border Grid.Row="1" Width="800" CornerRadius="10" BorderThickness="5" Margin="100, 0">
<Border.BorderBrush>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Color="#ec2075" Offset="0.0" />
<GradientStop Color="#f33944" Offset="0.50" />
</LinearGradientBrush>
</Border.BorderBrush>
<Rectangle Grid.Row="1">
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Color="#ec2075" Offset="0.0" />
<GradientStop Color="#f33944" Offset="0.50" />
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
</Border>
<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center" Height="50" Width="1000" VerticalAlignment="Center" Margin="0,5">
<Label Height="50" Width="1000" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Content="Currency Master" FontSize="25" Foreground="#ec2075" FontWeight="Bold"></Label>
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Top" Height="40" Width="800" Margin="100,0">
<Label Height="40" Width="180" Content="Enter Amount : " Margin="180 0 0 0" VerticalAlignment="Bottom" Foreground="White" FontSize="20"></Label>
<Label Height="40" Width="180" Content="Currency Name : " Margin="60 0 0 0" VerticalAlignment="Bottom" Foreground="White" FontSize="20"></Label>
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center" Height="60" Width="800" VerticalAlignment="Bottom" Margin="100,0">
<TextBox Name="txtAmount" Width="200" Height="30" Margin="180 0 0 0" PreviewTextInput="NumberValidationTextBox" FontSize="18" VerticalContentAlignment="Center" VerticalAlignment="Top"></TextBox>
<TextBox Name="txtCurrencyName" Width="200" Height="30" Margin="40 0 0 0" FontSize="18" VerticalContentAlignment="Center" VerticalAlignment="Top"></TextBox>
</StackPanel>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Top" Height="60" Width="800">
<Label Height="40" Width="150" Content="Enter Amount : " Margin="35 0 0 0" VerticalAlignment="Bottom" Foreground="White" FontSize="20"></Label>
<Label Height="40" Width="150" Content="From : " Margin="110 0 0 0" VerticalAlignment="Bottom" Foreground="White" FontSize="20"></Label>
<Label Height="40" Width="150" Content="To : " Margin="130 0 0 0" VerticalAlignment="Bottom" Foreground="White" FontSize="20"></Label>
</StackPanel>
<StackPanel Grid.Row="2" Height="60" Width="1000" Orientation="Horizontal">
<Button Name="btnSave" Height="40" Width="150" Content="Save" Click="btnSave_Click" Margin="350 0 20 0" Foreground="White" FontSize="20" Style="{StaticResource ButtonRound}">
<Button.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Color="#ec2075" Offset="0.0"/>
<GradientStop Color="#f33944" Offset="0.5"/>
</LinearGradientBrush>
</Button.Background>
</Button>
<Button Name="btnCancel" Height="40" Width="150" Content="Cancel" Click="btnCancel_Click" Foreground="White" FontSize="20" Style="{StaticResource ButtonRound}">
<Button.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Color="#ec2075" Offset="0.0"/>
<GradientStop Color="#f33944" Offset="0.5"/>
</LinearGradientBrush>
</Button.Background>
</Button>
</StackPanel>
<StackPanel Height="200" Width="800" Grid.Row="3" Margin="100,0" VerticalAlignment="Top">
<DataGrid Name="dgvCurrency" AutoGenerateColumns="False" Height="180" Margin="10" Width="480" Background="Transparent" CanUserAddRows="False" SelectedCellsChanged="dgvCurrency_SelectedCellsChanged" SelectionUnit="Cell" VerticalScrollBarVisibility="Auto">
<DataGrid.Columns>
<DataGridTextColumn x:Name="Id" Header="Id" Width="100" CanUserResize="False" Visibility="Hidden" Binding="{Binding Path}"/>
<DataGridTemplateColumn Header="" Width="70" IsReadOnly="True" DisplayIndex="0">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Image Source="/Images/edit-button.png" ToolTip="Edit" Width="20" Height="20" x:Name="Revise" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="" Width="70" IsReadOnly="True" DisplayIndex="1">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Image Source="/Images/delete-button.png" ToolTip="Delete" Width="20" Height="20" x:Name="Del" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn x:Name="Amount" Header="Amount" Width="100" CanUserResize="False" CanUserReorder="False"/>
<DataGridTextColumn x:Name="CurrencyName" Header="Currency Name" Width="*" MinWidth="20" CanUserResize="False" CanUserReorder="False"/>
</DataGrid.Columns>
</DataGrid>
</StackPanel>
<!--Adding Images in XAML-->
<!--<StackPanel Grid.Row="4" Height="150" Width="800" HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal">
<Image Height="150" Width="150" Source="/Images/Logo.jpg" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="325 0"/>
</StackPanel>-->
</Grid>
</TabItem>
</TabControl>
</Window>