2022-07-22 21:20:13 +02:00
|
|
|
<UserControl x:Class="RMWPFUserInterface.Views.SalesView"
|
|
|
|
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:RMWPFUserInterface.Views"
|
|
|
|
mc:Ignorable="d" Background="White" FontSize="24"
|
|
|
|
d:DesignHeight="550" d:DesignWidth="800">
|
|
|
|
<Grid>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="auto"/>
|
|
|
|
<RowDefinition Height="auto" />
|
|
|
|
<RowDefinition Height="auto" />
|
|
|
|
<RowDefinition Height="auto" />
|
|
|
|
<RowDefinition Height="auto" />
|
|
|
|
<RowDefinition Height="auto" />
|
|
|
|
<RowDefinition Height="auto" />
|
|
|
|
<RowDefinition Height="auto" />
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="auto"/>
|
|
|
|
<ColumnDefinition Width="auto"/>
|
|
|
|
<ColumnDefinition Width="auto"/>
|
|
|
|
<ColumnDefinition Width="auto"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- Header -->
|
|
|
|
<TextBlock Text="Sales Page" FontSize="48"
|
|
|
|
Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3"
|
|
|
|
Margin="0 0 0 30"/>
|
|
|
|
<!-- Column 0 -->
|
|
|
|
<TextBlock Text="Items" Grid.Row="1" Grid.Column="0"/>
|
|
|
|
<ListBox x:Name="Products" Grid.Row="2" Grid.Column="0"
|
2022-07-23 17:09:13 +02:00
|
|
|
MinHeight="200" MinWidth="150" SelectedItem="{Binding SelectedProduct}">
|
|
|
|
<ListBox.ItemTemplate>
|
|
|
|
<DataTemplate>
|
2022-07-24 00:23:37 +02:00
|
|
|
<StackPanel Orientation="Vertical">
|
|
|
|
<TextBlock Text="{Binding ProductName}"/>
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<TextBlock Text="Price : " FontSize="14"/>
|
|
|
|
<TextBlock Text="{ Binding RetailPrice, StringFormat='{}{0:C}'}" FontSize="14"/>
|
|
|
|
</StackPanel>
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="5 0 0 0 ">
|
2022-07-25 17:02:36 +02:00
|
|
|
<TextBlock Text="Quantity : " FontSize="14"/>
|
2022-07-24 00:23:37 +02:00
|
|
|
<TextBlock Text="{ Binding QuantityInStock}" FontSize="14"/>
|
|
|
|
</StackPanel>
|
|
|
|
</StackPanel>
|
|
|
|
</StackPanel>
|
2022-07-23 17:09:13 +02:00
|
|
|
</DataTemplate>
|
|
|
|
</ListBox.ItemTemplate>
|
|
|
|
</ListBox>
|
2022-07-22 21:20:13 +02:00
|
|
|
|
|
|
|
<!-- Column 1 -->
|
|
|
|
<StackPanel Orientation="Vertical" Grid.Column="1"
|
|
|
|
Grid.Row="2" Margin="20 0" >
|
|
|
|
<TextBlock Text="Quantity" />
|
2022-07-23 17:09:13 +02:00
|
|
|
<TextBox x:Name="ItemQuantity" MinWidth="100" Margin="0 0 0 10"/>
|
2022-07-22 21:20:13 +02:00
|
|
|
<Button x:Name="AddToCart" Content="Add to Cart" Margin="0 0 0 30"
|
|
|
|
Padding="5"/>
|
|
|
|
<Button x:Name="RemoveFromCart" Content="Remove from Cart"
|
|
|
|
Padding="5"/>
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
<!-- Column 2 -->
|
|
|
|
<TextBlock Text="Cart" Grid.Row="1" Grid.Column="2"/>
|
|
|
|
<ListBox x:Name="Cart" Grid.Row="2" Grid.Column="2"
|
2022-07-27 15:43:26 +02:00
|
|
|
MinHeight="200" MinWidth="150" SelectedItem="{Binding SelectedCartItem}">
|
2022-07-23 17:09:13 +02:00
|
|
|
<ListBox.ItemTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<TextBlock Text="{Binding DisplayText}"/>
|
|
|
|
</DataTemplate>
|
|
|
|
</ListBox.ItemTemplate>
|
|
|
|
</ListBox>
|
2022-07-22 21:20:13 +02:00
|
|
|
|
|
|
|
<DockPanel Grid.Row="3" Grid.Column="2">
|
|
|
|
<TextBlock Text="SubTotal: " Margin="0 0 15 0"/>
|
|
|
|
<TextBlock x:Name="SubTotal" Text="$0.00"
|
|
|
|
TextAlignment="Right"/>
|
|
|
|
</DockPanel>
|
|
|
|
|
|
|
|
<DockPanel Grid.Row="4" Grid.Column="2">
|
|
|
|
<TextBlock Text="Tax: " />
|
|
|
|
<TextBlock x:Name="Tax" Text="$0.00"
|
|
|
|
TextAlignment="Right"/>
|
|
|
|
</DockPanel>
|
|
|
|
|
|
|
|
<DockPanel Grid.Row="5" Grid.Column="2">
|
|
|
|
<TextBlock Text="Total: " />
|
|
|
|
<TextBlock x:Name="Total" Text="$0.00"
|
|
|
|
TextAlignment="Right"/>
|
|
|
|
</DockPanel>
|
|
|
|
|
|
|
|
<Button x:Name="CheckOut" Grid.Row="6" Grid.Column="2"
|
|
|
|
Content="Check Out"
|
|
|
|
Margin="0 20 0 0" Padding="5"/>
|
|
|
|
</Grid>
|
|
|
|
</UserControl>
|