Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <UserControl x:Class="ArbitrageClient.AddPurchaseUserControl"
- 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:ArbitrageClient"
- mc:Ignorable="d"
- d:DesignHeight="600" d:DesignWidth="800">
- <Grid Margin="10">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- <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="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
- <Grid.Resources>
- <Style x:Key="TextBoxMarginStyle" TargetType="{x:Type TextBox}">
- <Setter Property="Margin" Value="0,2,0,2" />
- </Style>
- <Style TargetType="{x:Type ComboBox}">
- <Setter Property="Margin" Value="0,2,0,2" />
- </Style>
- </Grid.Resources>
- <Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="Bold" HorizontalContentAlignment="Center">General</Label>
- <Label Grid.Row="1" Grid.Column="0">Purchase date: </Label>
- <DatePicker Grid.Row="1" Grid.Column="1" />
- <Label Grid.Row="2" Grid.ColumnSpan="2" Visibility="Hidden">Placeholder</Label>
- <Label Grid.Row="3" Grid.ColumnSpan="2" FontWeight="Bold" HorizontalContentAlignment="Center">Seller</Label>
- <Label Grid.Row="4" Grid.Column="0">Name: </Label>
- <TextBox Grid.Row="4" Grid.Column="1" />
- <Label Grid.Row="5" Grid.Column="0">Street: </Label>
- <TextBox Grid.Row="5" Grid.Column="1" />
- <Label Grid.Row="6" Grid.Column="0">City: </Label>
- <TextBox Grid.Row="6" Grid.Column="1" />
- <Label Grid.Row="7" Grid.Column="0">Tel. number: </Label>
- <TextBox Grid.Row="7" Grid.Column="1" />
- <Label Grid.Row="8" Grid.Column="0">Comments: </Label>
- <TextBox Grid.Row="8" Grid.Column="1" />
- <Label Grid.Row="9" Grid.ColumnSpan="2" Visibility="Hidden">Placeholder</Label>
- <Label Grid.Row="10" Grid.ColumnSpan="2" FontWeight="Bold" HorizontalContentAlignment="Center">Pricing</Label>
- <Label Grid.Row="11" Grid.Column="0">Extra cost: </Label>
- <ComboBox Grid.Row="11" Grid.Column="1" x:Name="extraCost">
- <ComboBoxItem Tag="FuelCost">Fuel cost</ComboBoxItem>
- <ComboBoxItem Tag="ShippingCost">Shipping cost</ComboBoxItem>
- <ComboBoxItem Tag="ShippingIncluded">Shipping included</ComboBoxItem>
- </ComboBox>
- <Label Grid.Row="12" Grid.Column="0">Cost: </Label>
- <TextBox Grid.Row="12" Grid.Column="1" Name="fuelCostTextBox">
- <TextBox.Style>
- <Style BasedOn="{StaticResource {x:Type TextBox}}">
- <Setter Property="TextBlock.Visibility" Value="Collapsed"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding ElementName=extraCost, Path=SelectedItem.Tag}" Value="FuelCost">
- <Setter Property="TextBlock.Visibility" Value="Visible" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </TextBox.Style>
- </TextBox>
- <TextBox Grid.Row="12" Grid.Column="1">
- <TextBox.Style>
- <Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource TextBoxMarginStyle}">
- <Setter Property="TextBlock.Visibility" Value="Collapsed"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding ElementName=extraCost, Path=SelectedItem.Tag}" Value="ShippingCost">
- <Setter Property="TextBlock.Visibility" Value="Visible" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </TextBox.Style>
- </TextBox>
- <Label Grid.Row="12" Grid.Column="1">
- <Label.Style>
- <Style>
- <Setter Property="Label.Visibility" Value="Collapsed"></Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding ElementName=extraCost, Path=SelectedItem.Tag}" Value="ShippingIncluded">
- <Setter Property="Label.Visibility" Value="Visible" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Label.Style>
- N/A
- </Label>
- </Grid>
- </UserControl>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement