<!--
 =============================================================================================
  This file was AUTO-GENERATED by "WPF Views" Xomega.Net generator.
 
  Manual CHANGES to this file WILL BE LOST when the code is regenerated.
 =============================================================================================
-->
<xov:WPFDetailsView xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:xov="clr-namespace:Xomega.Framework.Views;assembly=Xomega.Framework.Wpf"
                    xmlns:o="clr-namespace:AdventureWorks.Client.Objects;assembly=AdventureWorks.Client.Common"
                    xmlns:v="clr-namespace:AdventureWorks.Client.Wpf"
                    xmlns:xom="clr-namespace:Xomega.Framework;assembly=Xomega.Framework.Wpf"
                    x:Class="AdventureWorks.Client.Wpf.SalesOrderView"
                    ViewWidth="800"
                    ViewHeight="680">
  <Grid Margin="10">
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="*"/>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>
    <TextBlock Grid.Row="0" Name="viewTitle" Text="View Title"
               Style="{StaticResource ViewTitleStyle}"
               Margin="10,0,0,5"/>
    <GroupBox Grid.Row="1" Header="Sales Order">
      <StackPanel>
        <Grid>
          <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
          </Grid.RowDefinitions>
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
          </Grid.ColumnDefinitions>
          <Label Grid.Row="0" Grid.Column="0" Name="lblSalesOrderNumber"
                 Style="{StaticResource LabelStyle}">_Sales Order Number:</Label>
          <TextBlock Grid.Row="0" Grid.Column="1"
                     xom:Property.Label="{Binding ElementName=lblSalesOrderNumber}"
                     x:Name="ctlSalesOrderNumber"
                     xom:Property.Name="{x:Static o:SalesOrderObject.SalesOrderNumber}"
                     Style="{StaticResource DataLabelStyle}"/>
          <Label Grid.Row="1" Grid.Column="0" Name="lblOrderDate"
                 Style="{StaticResource LabelStyle}">_Order Date:</Label>
          <TextBlock Grid.Row="1" Grid.Column="1"
                     xom:Property.Label="{Binding ElementName=lblOrderDate}"
                     x:Name="ctlOrderDate"
                     xom:Property.Name="{x:Static o:SalesOrderObject.OrderDate}"
                     Style="{StaticResource DataLabelStyle}"/>
          <Label Grid.Row="2" Grid.Column="0" Name="lblStatus"
                 Style="{StaticResource LabelStyle}">_Status:</Label>
          <ComboBox Grid.Row="2" Grid.Column="1"
                    xom:Property.Label="{Binding ElementName=lblStatus}"
                    x:Name="ctlStatus"
                    xom:Property.Name="{x:Static o:SalesOrderObject.Status}"
                    Style="{StaticResource ControlStyle}"/>
          <Label Grid.Row="3" Grid.Column="0" Name="lblOnlineOrderFlag"
                 Style="{StaticResource LabelStyle}">_Online Order Flag:</Label>
          <CheckBox Grid.Row="3" Grid.Column="1"
                    xom:Property.Label="{Binding ElementName=lblOnlineOrderFlag}"
                    x:Name="ctlOnlineOrderFlag"
                    xom:Property.Name="{x:Static o:SalesOrderObject.OnlineOrderFlag}"
                    Style="{StaticResource ControlStyle}"/>
          <Label Grid.Row="4" Grid.Column="0" Name="lblPurchaseOrderNumber"
                 Style="{StaticResource LabelStyle}">_Purchase Order Number:</Label>
          <TextBox Grid.Row="4" Grid.Column="1"
                   xom:Property.Label="{Binding ElementName=lblPurchaseOrderNumber}"
                   x:Name="ctlPurchaseOrderNumber"
                   xom:Property.Name="{x:Static o:SalesOrderObject.PurchaseOrderNumber}"
                   Style="{StaticResource ControlStyle}"/>
          <Label Grid.Row="0" Grid.Column="2" Name="lblAccountNumber"
                 Style="{StaticResource LabelStyle}">_Account Number:</Label>
          <TextBox Grid.Row="0" Grid.Column="3"
                   xom:Property.Label="{Binding ElementName=lblAccountNumber}"
                   x:Name="ctlAccountNumber"
                   xom:Property.Name="{x:Static o:SalesOrderObject.AccountNumber}"
                   Style="{StaticResource ControlStyle}"/>
          <Label Grid.Row="1" Grid.Column="2" Name="lblShipDate"
                 Style="{StaticResource LabelStyle}">_Ship Date:</Label>
          <DatePicker Grid.Row="1" Grid.Column="3"
                      xom:Property.Label="{Binding ElementName=lblShipDate}"
                      x:Name="ctlShipDate"
                      xom:Property.Name="{x:Static o:SalesOrderObject.ShipDate}"
                      Style="{StaticResource ControlStyle}"/>
          <Label Grid.Row="2" Grid.Column="2" Name="lblComment"
                 Style="{StaticResource LabelStyle}">_Comment:</Label>
          <TextBox Grid.Row="2" Grid.Column="3"
                   xom:Property.Label="{Binding ElementName=lblComment}"
                   x:Name="ctlComment"
                   xom:Property.Name="{x:Static o:SalesOrderObject.Comment}"
                   Style="{StaticResource ControlStyle}"/>
          <Label Grid.Row="3" Grid.Column="2" Name="lblRevisionNumber"
                 Style="{StaticResource LabelStyle}">_Revision Number:</Label>
          <TextBlock Grid.Row="3" Grid.Column="3"
                     xom:Property.Label="{Binding ElementName=lblRevisionNumber}"
                     x:Name="ctlRevisionNumber"
                     xom:Property.Name="{x:Static o:SalesOrderObject.RevisionNumber}"
                     Style="{StaticResource DataLabelStyle}"/>
          <Label Grid.Row="4" Grid.Column="2" Name="lblModifiedDate"
                 Style="{StaticResource LabelStyle}">_Modified Date:</Label>
          <TextBlock Grid.Row="4" Grid.Column="3"
                     xom:Property.Label="{Binding ElementName=lblModifiedDate}"
                     x:Name="ctlModifiedDate"
                     xom:Property.Name="{x:Static o:SalesOrderObject.ModifiedDate}"
                     Style="{StaticResource DataLabelStyle}"/>
        </Grid>
      </StackPanel>
    </GroupBox>
    <TabControl Grid.Row="2" Margin="0,10,0,0">
      <TabItem Header="Customer">
        <StackPanel DataContext="{Binding CustomerObject}" xom:Data.ObjectBinding="">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Label Grid.Row="0" Grid.Column="0" Name="lblCustomerStoreName"
                   Style="{StaticResource LabelStyle}">_Store Name:</Label>
            <TextBlock Grid.Row="0" Grid.Column="1"
                       xom:Property.Label="{Binding ElementName=lblCustomerStoreName}"
                       x:Name="ctlCustomerStoreName"
                       xom:Property.Name="{x:Static o:SalesOrderCustomerObject.StoreName}"
                       Style="{StaticResource DataLabelStyle}"/>
            <Label Grid.Row="1" Grid.Column="0" Name="lblCustomerPersonName"
                   Style="{StaticResource LabelStyle}">_Person Name:</Label>
            <TextBlock Grid.Row="1" Grid.Column="1"
                       xom:Property.Label="{Binding ElementName=lblCustomerPersonName}"
                       x:Name="ctlCustomerPersonName"
                       xom:Property.Name="{x:Static o:SalesOrderCustomerObject.PersonName}"
                       Style="{StaticResource DataLabelStyle}"/>
            <Label Grid.Row="0" Grid.Column="2" Name="lblCustomerAccountNumber"
                   Style="{StaticResource LabelStyle}">_Account Number:</Label>
            <TextBlock Grid.Row="0" Grid.Column="3"
                       xom:Property.Label="{Binding ElementName=lblCustomerAccountNumber}"
                       x:Name="ctlCustomerAccountNumber"
                       xom:Property.Name="{x:Static o:SalesOrderCustomerObject.AccountNumber}"
                       Style="{StaticResource DataLabelStyle}"/>
            <Label Grid.Row="1" Grid.Column="2" Name="lblCustomerTerritoryId"
                   Style="{StaticResource LabelStyle}">_Territory:</Label>
            <TextBlock Grid.Row="1" Grid.Column="3"
                       xom:Property.Label="{Binding ElementName=lblCustomerTerritoryId}"
                       x:Name="ctlCustomerTerritoryId"
                       xom:Property.Name="{x:Static o:SalesOrderCustomerObject.TerritoryId}"
                       Style="{StaticResource DataLabelStyle}"/>
          </Grid>
          <GroupBox Header="Lookup">
            <StackPanel DataContext="{Binding LookupObject}" xom:Data.ObjectBinding="">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Label Grid.Row="0" Grid.Column="0" Name="lblLookupStoreName"
                       Style="{StaticResource LabelStyle}">_Store Name:</Label>
                <TextBox Grid.Row="0" Grid.Column="1"
                         xom:Property.Label="{Binding ElementName=lblLookupStoreName}"
                         x:Name="ctlLookupStoreName"
                         xom:Property.Name="{x:Static o:SalesCustomerLookupObject.StoreName}"
                         Style="{StaticResource ControlStyle}"/>
                <Label Grid.Row="0" Grid.Column="2" Name="lblLookupPersonName"
                       Style="{StaticResource LabelStyle}">_Person Name:</Label>
                <TextBox Grid.Row="0" Grid.Column="3"
                         xom:Property.Label="{Binding ElementName=lblLookupPersonName}"
                         x:Name="ctlLookupPersonName"
                         xom:Property.Name="{x:Static o:SalesCustomerLookupObject.PersonName}"
                         Style="{StaticResource ControlStyle}"/>
              </Grid>
              <StackPanel Orientation="Horizontal" Margin="5">
                <TextBlock>
                  <Hyperlink Name="LinkCustomerLookupLookUp"
                             Command="{Binding Path=LinkCustomerLookupLookUp_Command, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type xov:WPFView}}}">Look Up</Hyperlink>
                </TextBlock>
              </StackPanel>
            </StackPanel>
          </GroupBox>
          <GroupBox Header="Billing Address">
            <StackPanel DataContext="{Binding BillingAddressObject}" xom:Data.ObjectBinding="">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Label Grid.Row="0" Grid.Column="0" Name="lblBillingAddressAddressId"
                       Style="{StaticResource LabelStyle}">_Address Type:</Label>
                <ComboBox Grid.Row="0" Grid.Column="1"
                          xom:Property.Label="{Binding ElementName=lblBillingAddressAddressId}"
                          x:Name="ctlBillingAddressAddressId"
                          xom:Property.Name="{x:Static o:AddressObject.AddressId}"
                          Style="{StaticResource ControlStyle}"/>
                <Label Grid.Row="1" Grid.Column="0" Name="lblBillingAddressAddressLine1"
                       Style="{StaticResource LabelStyle}">_Address Line1:</Label>
                <TextBlock Grid.Row="1" Grid.Column="1"
                           xom:Property.Label="{Binding ElementName=lblBillingAddressAddressLine1}"
                           x:Name="ctlBillingAddressAddressLine1"
                           xom:Property.Name="{x:Static o:AddressObject.AddressLine1}"
                           Style="{StaticResource DataLabelStyle}"/>
                <Label Grid.Row="2" Grid.Column="0" Name="lblBillingAddressAddressLine2"
                       Style="{StaticResource LabelStyle}">_Address Line2:</Label>
                <TextBlock Grid.Row="2" Grid.Column="1"
                           xom:Property.Label="{Binding ElementName=lblBillingAddressAddressLine2}"
                           x:Name="ctlBillingAddressAddressLine2"
                           xom:Property.Name="{x:Static o:AddressObject.AddressLine2}"
                           Style="{StaticResource DataLabelStyle}"/>
                <Label Grid.Row="0" Grid.Column="2" Name="lblBillingAddressCityState"
                       Style="{StaticResource LabelStyle}">_City/State:</Label>
                <TextBlock Grid.Row="0" Grid.Column="3"
                           xom:Property.Label="{Binding ElementName=lblBillingAddressCityState}"
                           x:Name="ctlBillingAddressCityState"
                           xom:Property.Name="{x:Static o:AddressObject.CityState}"
                           Style="{StaticResource DataLabelStyle}"/>
                <Label Grid.Row="1" Grid.Column="2" Name="lblBillingAddressPostalCode"
                       Style="{StaticResource LabelStyle}">_Postal Code:</Label>
                <TextBlock Grid.Row="1" Grid.Column="3"
                           xom:Property.Label="{Binding ElementName=lblBillingAddressPostalCode}"
                           x:Name="ctlBillingAddressPostalCode"
                           xom:Property.Name="{x:Static o:AddressObject.PostalCode}"
                           Style="{StaticResource DataLabelStyle}"/>
                <Label Grid.Row="2" Grid.Column="2" Name="lblBillingAddressCountry"
                       Style="{StaticResource LabelStyle}">_Country:</Label>
                <TextBlock Grid.Row="2" Grid.Column="3"
                           xom:Property.Label="{Binding ElementName=lblBillingAddressCountry}"
                           x:Name="ctlBillingAddressCountry"
                           xom:Property.Name="{x:Static o:AddressObject.Country}"
                           Style="{StaticResource DataLabelStyle}"/>
              </Grid>
            </StackPanel>
          </GroupBox>
          <GroupBox Header="Shipping Address">
            <StackPanel DataContext="{Binding ShippingAddressObject}" xom:Data.ObjectBinding="">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Label Grid.Row="0" Grid.Column="0" Name="lblShippingAddressAddressId"
                       Style="{StaticResource LabelStyle}">_Address Type:</Label>
                <ComboBox Grid.Row="0" Grid.Column="1"
                          xom:Property.Label="{Binding ElementName=lblShippingAddressAddressId}"
                          x:Name="ctlShippingAddressAddressId"
                          xom:Property.Name="{x:Static o:AddressObject.AddressId}"
                          Style="{StaticResource ControlStyle}"/>
                <Label Grid.Row="1" Grid.Column="0" Name="lblShippingAddressAddressLine1"
                       Style="{StaticResource LabelStyle}">_Address Line1:</Label>
                <TextBlock Grid.Row="1" Grid.Column="1"
                           xom:Property.Label="{Binding ElementName=lblShippingAddressAddressLine1}"
                           x:Name="ctlShippingAddressAddressLine1"
                           xom:Property.Name="{x:Static o:AddressObject.AddressLine1}"
                           Style="{StaticResource DataLabelStyle}"/>
                <Label Grid.Row="2" Grid.Column="0" Name="lblShippingAddressAddressLine2"
                       Style="{StaticResource LabelStyle}">_Address Line2:</Label>
                <TextBlock Grid.Row="2" Grid.Column="1"
                           xom:Property.Label="{Binding ElementName=lblShippingAddressAddressLine2}"
                           x:Name="ctlShippingAddressAddressLine2"
                           xom:Property.Name="{x:Static o:AddressObject.AddressLine2}"
                           Style="{StaticResource DataLabelStyle}"/>
                <Label Grid.Row="0" Grid.Column="2" Name="lblShippingAddressCityState"
                       Style="{StaticResource LabelStyle}">_City/State:</Label>
                <TextBlock Grid.Row="0" Grid.Column="3"
                           xom:Property.Label="{Binding ElementName=lblShippingAddressCityState}"
                           x:Name="ctlShippingAddressCityState"
                           xom:Property.Name="{x:Static o:AddressObject.CityState}"
                           Style="{StaticResource DataLabelStyle}"/>
                <Label Grid.Row="1" Grid.Column="2" Name="lblShippingAddressPostalCode"
                       Style="{StaticResource LabelStyle}">_Postal Code:</Label>
                <TextBlock Grid.Row="1" Grid.Column="3"
                           xom:Property.Label="{Binding ElementName=lblShippingAddressPostalCode}"
                           x:Name="ctlShippingAddressPostalCode"
                           xom:Property.Name="{x:Static o:AddressObject.PostalCode}"
                           Style="{StaticResource DataLabelStyle}"/>
                <Label Grid.Row="2" Grid.Column="2" Name="lblShippingAddressCountry"
                       Style="{StaticResource LabelStyle}">_Country:</Label>
                <TextBlock Grid.Row="2" Grid.Column="3"
                           xom:Property.Label="{Binding ElementName=lblShippingAddressCountry}"
                           x:Name="ctlShippingAddressCountry"
                           xom:Property.Name="{x:Static o:AddressObject.Country}"
                           Style="{StaticResource DataLabelStyle}"/>
              </Grid>
            </StackPanel>
          </GroupBox>
        </StackPanel>
      </TabItem>
      <TabItem Header="Detail">
        <Grid>
          <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
          </Grid.RowDefinitions>
          <ListView Grid.Row="0" x:Name="gridDetail" DataContext="{Binding DetailList}"
                    xom:Data.ObjectBinding="">
            <ListView.View>
              <GridView>
                <GridView.Columns>
                  <GridViewColumn Header="Product">
                    <GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <TextBlock>
                          <Hyperlink Name="LinkDetailDetails"
                                     Command="{Binding Path=LinkDetailDetails_Command, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type xov:WPFView}}}"
                                     CommandParameter="{Binding}"
                                     xom:Property.Name="{x:Static o:SalesOrderDetailList.ProductId}"/>
                        </TextBlock>
                      </DataTemplate>
                    </GridViewColumn.CellTemplate>
                  </GridViewColumn>
                  <GridViewColumn Header="Qty">
                    <GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <TextBlock xom:Property.Name="{x:Static o:SalesOrderDetailList.OrderQty}"/>
                      </DataTemplate>
                    </GridViewColumn.CellTemplate>
                  </GridViewColumn>
                  <GridViewColumn Header="Price">
                    <GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <TextBlock xom:Property.Name="{x:Static o:SalesOrderDetailList.UnitPrice}"/>
                      </DataTemplate>
                    </GridViewColumn.CellTemplate>
                  </GridViewColumn>
                  <GridViewColumn Header="Discount">
                    <GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <TextBlock xom:Property.Name="{x:Static o:SalesOrderDetailList.UnitPriceDiscount}"/>
                      </DataTemplate>
                    </GridViewColumn.CellTemplate>
                  </GridViewColumn>
                  <GridViewColumn Header="Special Offer">
                    <GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <TextBlock xom:Property.Name="{x:Static o:SalesOrderDetailList.SpecialOfferId}"/>
                      </DataTemplate>
                    </GridViewColumn.CellTemplate>
                  </GridViewColumn>
                  <GridViewColumn Header="Total">
                    <GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <TextBlock xom:Property.Name="{x:Static o:SalesOrderDetailList.LineTotal}"/>
                      </DataTemplate>
                    </GridViewColumn.CellTemplate>
                  </GridViewColumn>
                  <GridViewColumn Header="Tracking #">
                    <GridViewColumn.CellTemplate>
                      <DataTemplate>
                        <TextBlock xom:Property.Name="{x:Static o:SalesOrderDetailList.CarrierTrackingNumber}"/>
                      </DataTemplate>
                    </GridViewColumn.CellTemplate>
                  </GridViewColumn>
                </GridView.Columns>
              </GridView>
            </ListView.View>
          </ListView>
          <StackPanel Orientation="Horizontal" Margin="5" Grid.Row="1">
            <TextBlock>
              <Hyperlink Name="LinkDetailNew"
                         Command="{Binding Path=LinkDetailNew_Command, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type xov:WPFView}}}">New</Hyperlink>
            </TextBlock>
          </StackPanel>
        </Grid>
      </TabItem>
      <TabItem Header="Payment">
        <StackPanel DataContext="{Binding PaymentObject}" xom:Data.ObjectBinding="">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Label Grid.Row="0" Grid.Column="0" Name="lblPaymentSubTotal"
                   Style="{StaticResource LabelStyle}">_Sub Total:</Label>
            <TextBlock Grid.Row="0" Grid.Column="1"
                       xom:Property.Label="{Binding ElementName=lblPaymentSubTotal}"
                       x:Name="ctlPaymentSubTotal"
                       xom:Property.Name="{x:Static o:SalesOrderPaymentObject.SubTotal}"
                       Style="{StaticResource DataLabelStyle}"/>
            <Label Grid.Row="1" Grid.Column="0" Name="lblPaymentShipMethodId"
                   Style="{StaticResource LabelStyle}">_Shipment Method:</Label>
            <ComboBox Grid.Row="1" Grid.Column="1"
                      xom:Property.Label="{Binding ElementName=lblPaymentShipMethodId}"
                      x:Name="ctlPaymentShipMethodId"
                      xom:Property.Name="{x:Static o:SalesOrderPaymentObject.ShipMethodId}"
                      Style="{StaticResource ControlStyle}"/>
            <Label Grid.Row="2" Grid.Column="0" Name="lblPaymentTaxAmt"
                   Style="{StaticResource LabelStyle}">_Tax Amt:</Label>
            <TextBlock Grid.Row="2" Grid.Column="1"
                       xom:Property.Label="{Binding ElementName=lblPaymentTaxAmt}"
                       x:Name="ctlPaymentTaxAmt"
                       xom:Property.Name="{x:Static o:SalesOrderPaymentObject.TaxAmt}"
                       Style="{StaticResource DataLabelStyle}"/>
            <Label Grid.Row="3" Grid.Column="0" Name="lblPaymentFreight"
                   Style="{StaticResource LabelStyle}">_Freight:</Label>
            <TextBlock Grid.Row="3" Grid.Column="1"
                       xom:Property.Label="{Binding ElementName=lblPaymentFreight}"
                       x:Name="ctlPaymentFreight"
                       xom:Property.Name="{x:Static o:SalesOrderPaymentObject.Freight}"
                       Style="{StaticResource DataLabelStyle}"/>
            <Label Grid.Row="0" Grid.Column="2" Name="lblPaymentTotalDue"
                   Style="{StaticResource LabelStyle}">_Total Due:</Label>
            <TextBlock Grid.Row="0" Grid.Column="3"
                       xom:Property.Label="{Binding ElementName=lblPaymentTotalDue}"
                       x:Name="ctlPaymentTotalDue"
                       xom:Property.Name="{x:Static o:SalesOrderPaymentObject.TotalDue}"
                       Style="{StaticResource DataLabelStyle}"/>
            <Label Grid.Row="1" Grid.Column="2" Name="lblPaymentDueDate"
                   Style="{StaticResource LabelStyle}">_Due Date:</Label>
            <DatePicker Grid.Row="1" Grid.Column="3"
                        xom:Property.Label="{Binding ElementName=lblPaymentDueDate}"
                        x:Name="ctlPaymentDueDate"
                        xom:Property.Name="{x:Static o:SalesOrderPaymentObject.DueDate}"
                        Style="{StaticResource ControlStyle}"/>
            <Label Grid.Row="2" Grid.Column="2" Name="lblPaymentCurrencyRate"
                   Style="{StaticResource LabelStyle}">_Currency Rate:</Label>
            <TextBlock Grid.Row="2" Grid.Column="3"
                       xom:Property.Label="{Binding ElementName=lblPaymentCurrencyRate}"
                       x:Name="ctlPaymentCurrencyRate"
                       xom:Property.Name="{x:Static o:SalesOrderPaymentObject.CurrencyRate}"
                       Style="{StaticResource DataLabelStyle}"/>
          </Grid>
          <GroupBox Header="Credit Card">
            <StackPanel DataContext="{Binding CreditCardObject}" xom:Data.ObjectBinding="">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                  <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Label Grid.Row="0" Grid.Column="0" Name="lblCreditCardCreditCardId"
                       Style="{StaticResource LabelStyle}">_Credit Card:</Label>
                <ComboBox Grid.Row="0" Grid.Column="1"
                          xom:Property.Label="{Binding ElementName=lblCreditCardCreditCardId}"
                          x:Name="ctlCreditCardCreditCardId"
                          xom:Property.Name="{x:Static o:CreditCardPaymentObject.CreditCardId}"
                          Style="{StaticResource ControlStyle}"/>
                <Label Grid.Row="1" Grid.Column="0" Name="lblCreditCardCardNumber"
                       Style="{StaticResource LabelStyle}">_Card Number:</Label>
                <TextBlock Grid.Row="1" Grid.Column="1"
                           xom:Property.Label="{Binding ElementName=lblCreditCardCardNumber}"
                           x:Name="ctlCreditCardCardNumber"
                           xom:Property.Name="{x:Static o:CreditCardPaymentObject.CardNumber}"
                           Style="{StaticResource DataLabelStyle}"/>
                <Label Grid.Row="0" Grid.Column="2" Name="lblCreditCardExpiration"
                       Style="{StaticResource LabelStyle}">_Expiration:</Label>
                <TextBlock Grid.Row="0" Grid.Column="3"
                           xom:Property.Label="{Binding ElementName=lblCreditCardExpiration}"
                           x:Name="ctlCreditCardExpiration"
                           xom:Property.Name="{x:Static o:CreditCardPaymentObject.Expiration}"
                           Style="{StaticResource DataLabelStyle}"/>
                <Label Grid.Row="1" Grid.Column="2" Name="lblCreditCardCreditCardApprovalCode"
                       Style="{StaticResource LabelStyle}">_Credit Card Approval Code:</Label>
                <TextBox Grid.Row="1" Grid.Column="3"
                         xom:Property.Label="{Binding ElementName=lblCreditCardCreditCardApprovalCode}"
                         x:Name="ctlCreditCardCreditCardApprovalCode"
                         xom:Property.Name="{x:Static o:CreditCardPaymentObject.CreditCardApprovalCode}"
                         Style="{StaticResource ControlStyle}"/>
              </Grid>
            </StackPanel>
          </GroupBox>
        </StackPanel>
      </TabItem>
      <TabItem Header="Sales">
        <StackPanel DataContext="{Binding SalesObject}" xom:Data.ObjectBinding="">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Label Grid.Row="0" Grid.Column="0" Name="lblSalesTerritoryId"
                   Style="{StaticResource LabelStyle}">_Territory:</Label>
            <ComboBox Grid.Row="0" Grid.Column="1"
                      xom:Property.Label="{Binding ElementName=lblSalesTerritoryId}"
                      x:Name="ctlSalesTerritoryId"
                      xom:Property.Name="{x:Static o:SalesOrderSalesObject.TerritoryId}"
                      Style="{StaticResource ControlStyle}"/>
            <Label Grid.Row="1" Grid.Column="0" Name="lblSalesSalesPersonId"
                   Style="{StaticResource LabelStyle}">_Sales Person:</Label>
            <ComboBox Grid.Row="1" Grid.Column="1"
                      xom:Property.Label="{Binding ElementName=lblSalesSalesPersonId}"
                      x:Name="ctlSalesSalesPersonId"
                      xom:Property.Name="{x:Static o:SalesOrderSalesObject.SalesPersonId}"
                      Style="{StaticResource ControlStyle}"/>
            <Label Grid.Row="0" Grid.Column="2" Name="lblSalesSalesReason"
                   Style="{StaticResource LabelStyle}">_Sales Reasons:</Label>
            <ListBox Grid.Row="0" Grid.Column="3"
                     xom:Property.Label="{Binding ElementName=lblSalesSalesReason}"
                     x:Name="ctlSalesSalesReason"
                     xom:Property.Name="{x:Static o:SalesOrderSalesObject.SalesReason}"
                     Style="{StaticResource ControlStyle}"
                     MinHeight="21"
                     MaxHeight="84"/>
          </Grid>
        </StackPanel>
      </TabItem>
    </TabControl>
    <v:Errors Grid.Row="3" x:Name="pnlErrors"/>
    <DockPanel Grid.Row="4">
      <DockPanel DockPanel.Dock="Bottom">
        <Button x:Name="btnDelete" Width="75" Margin="0,10,0,0" Content="_Delete"
                DockPanel.Dock="Left"/>
        <Button x:Name="btnClose" Width="75" Margin="0,10,0,0" Content="_Close"
                DockPanel.Dock="Right"/>
        <Button x:Name="btnSave" Width="75" Margin="10,10,10,0" Content="_Save"
                HorizontalAlignment="Right"/>
      </DockPanel>
      <StackPanel/>
    </DockPanel>
  </Grid>
</xov:WPFDetailsView>