<Window x:Class="TradeBlotter.UIUtils.ClosePositionDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Close Position" Height="260" Width="200"
        xmlns:wpfx="http://schemas.xceed.com/wpf/xaml/toolkit"
        WindowStartupLocation="CenterScreen" 
        SizeToContent="WidthAndHeight"
        MinWidth="200"
        MinHeight="200"
        WindowStyle="SingleBorderWindow"
        ResizeMode="CanMinimize">
  <wpfx:BusyIndicator Name="BusyBar" IsBusy="{Binding Path=BusyIndicator}" BusyContent="{Binding Path=BusyContent}">
    <StackPanel Margin="5" Orientation="Vertical">
      <Grid DockPanel.Dock="Left" Margin="0,2,4,2">
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto" />
          <ColumnDefinition Width="6" />
          <ColumnDefinition Width="75*" />
          <ColumnDefinition Width="6" />
          <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
          <RowDefinition Height="20*" />
          <RowDefinition Height="25" />
          <RowDefinition Height="25" />
          <RowDefinition Height="25" />
          <RowDefinition Height="25" />
          <RowDefinition Height="25" />
          <RowDefinition Height="25" />
          <RowDefinition Height="25" />
          <RowDefinition Height="25" />
          <RowDefinition Height="25" />
        </Grid.RowDefinitions>

        <Label Name="lblCompanyName"  Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3"></Label>

        <Label Name="lblSymbol" Grid.Row="2" Grid.Column="0">Symbol</Label>
        <TextBox Name="txtSymbol" IsEnabled="False" Grid.Row="2" IsReadOnly="True" Grid.Column="2" MinWidth="75" AcceptsReturn="true">Symbol</TextBox>

        <Label Name="lblPurchaseDate" Grid.Row="3" Grid.Column="0" MinWidth="75">Purchase Date</Label>
        <DatePicker Name="dpPurchaseDate" IsEnabled="False" Grid.Row="3" Grid.Column="2"></DatePicker>

        <Label Name="lblSellDate" Grid.Row="4" Grid.Column="0" MinWidth="75">Sell Date</Label>
        <DatePicker Name="dpSellDate" Grid.Row="4" Grid.Column="2" SelectedDateChanged="dpSellDate_SelectionChanged"></DatePicker>

        <Label Name="lblSellPrice" Grid.Row="5" Grid.Column="0">Sell Price</Label>
        <TextBox Name="txtSellPrice" Grid.Row="5" Grid.Column="2" MinWidth="75" LostFocus="txtSellPrice_OnLostFocusHandler" KeyDown="txtSellPrice_OnKeyDownHandler">100.00</TextBox>
        <Label FontWeight="Bold" FontSize="10" Name="lblSellPriceInstructions" Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="3">(enter sell price then hit enter key)</Label>

        <CheckBox Name="cbDeleteStop" Grid.Row="7" Grid.Column="0">Delete Stop</CheckBox>

        <Label Name="lblMessage"  Grid.Row="8" Grid.Column="0" Grid.ColumnSpan="5"></Label>
        
        <Button Content="_Ok" MinWidth="75" IsDefault="False" Margin="2" Name="btnOk" Click="btnOk_Click" Grid.Row="9" Grid.Column="0"/>
        <Button Content="_Cancel" MinWidth="75" IsCancel="True" Margin="2" Name="btnCancel" Click="btnCancel_Click"  Grid.Row="9" Grid.Column="2"/>
      </Grid>
    </StackPanel>
  </wpfx:BusyIndicator>
</Window>
