<controls:ChildWindow x:Class="SilverlightAccesoColDatos.VenSecAgregarTfno"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
           xmlns:local="clr-namespace:SilverlightAccesoColDatos"
           Width="400" Height="330" 
           Title="Agregar teléfono" Loaded="ChildWindow_Loaded">
  <Grid x:Name="LayoutRoot" Margin="2">
    <Grid.Resources>
      <local:ConversorBytes_ImageSource x:Key="conversorBytes_ImageSource"/>
    </Grid.Resources>
    <Grid.ColumnDefinitions>
      <ColumnDefinition />
      <ColumnDefinition />
      <ColumnDefinition />
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
      <RowDefinition />
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
      <RowDefinition />
    </Grid.RowDefinitions>

    <Grid.Background>
      <ImageBrush ImageSource="Assets/telefono.jpg"/>
    </Grid.Background>

    <!-- Título -->
    <sdk:Label Grid.ColumnSpan="4"
         Style="{StaticResource EstiloTextoCabecera}">
      Introducir datos personales
    </sdk:Label>

    <sdk:Label Grid.Column="0" Grid.Row="1" Content="Foto:" Margin="5"/>
    <sdk:Label Grid.Column="2" Grid.Row="1" Content="ID:" Margin="5"/>
    <sdk:Label Grid.Column="0" Grid.Row="2" Content="Nombre:" Style="{StaticResource EstiloLabel}" />
    <sdk:Label Grid.Column="0" Grid.Row="3" Content="Dirección:" Style="{StaticResource EstiloLabel}" />
    <sdk:Label Grid.Column="0" Grid.Row="4" Content="Teléfono:" Style="{StaticResource EstiloLabel}" />
    <sdk:Label Grid.Column="0" Grid.Row="5" Content="Observaciones:"  Style="{StaticResource EstiloLabel}" />

    <Image Name="imFoto" Grid.Column="1" Grid.Row="1"
        Style="{StaticResource EstiloImagen}"
        Source="{Binding Path=Foto, Mode=TwoWay,
        Converter={StaticResource conversorBytes_ImageSource}}"
        MouseLeftButtonDown="imFoto_MouseLeftButtonDown" />
    <TextBox Grid.Column="2" Grid.Row="1" Name="ctID" Width="65" Margin="5"
             VerticalAlignment="Center" HorizontalAlignment="Right"           
             Text="{Binding Path=IdPersona, Mode=TwoWay}"/>
    <TextBox Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="2" Name="ctNombre"
             Style="{StaticResource EstiloTextBox}"
             Text="{Binding Path=Nombre, Mode=TwoWay}"/>
    <TextBox Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="2" Name="ctDireccion"
             Style="{StaticResource EstiloTextBox}"
             Text="{Binding Path=Direccion, Mode=TwoWay}"/>
    <TextBox Grid.Column="1" Grid.Row="4" Name="ctTelefono"
             Style="{StaticResource EstiloTextBox}"
             Text="{Binding Path=NumTelefono, Mode=TwoWay}"/>
    <TextBox Grid.Column="1" Grid.Row="5" Grid.ColumnSpan="2" Name="ctObservaciones"
             Style="{StaticResource EstiloTextBox}"
             Text="{Binding Path=Observaciones, Mode=TwoWay}"/>

    <Button x:Name="CancelButton" Content="Cancelar"
            Click="CancelButton_Click" Width="75" Height="23"
            HorizontalAlignment="Right" Margin="0,12,0,0" Grid.ColumnSpan="3" Grid.Row="6" />
    <Button x:Name="OKButton" Content="Aceptar"
            Click="OKButton_Click" Width="75" Height="23"
            HorizontalAlignment="Right" Margin="0,12,79,0" Grid.ColumnSpan="3" Grid.Row="6" />
  </Grid>
</controls:ChildWindow>
