<UserControl x:Class="ApSilverlight.SilverlightAutoCompleteBox"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  
    Width="400" Height="300">

  <Grid x:Name="LayoutRoot" Background="LightYellow">
    <Grid.Resources>
      <!-- Estilos -->
      <Style x:Key="EstiloTextBox" TargetType="TextBox">
        <Setter Property="Background" Value="LightYellow" />
        <Setter Property="Foreground" Value="DarkSlateGray" />
        <Setter Property="Margin" Value="5" />
        <Setter Property="FontWeight" Value="Bold" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="BorderBrush" Value="DarkGray" />
      </Style>
      <Style  x:Key="EstiloListBoxItem" TargetType="ListBoxItem">
        <Setter Property="Background" Value="Khaki" />
        <Setter Property="Foreground" Value="DarkSlateGray" />
        <Setter Property="Margin" Value="5" />
        <Setter Property="FontStyle" Value="Italic" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="BorderBrush" Value="DarkGray" />
      </Style>
    </Grid.Resources>
    <!-- Interfaz -->
    <Border BorderBrush="DarkGray" BorderThickness="2">
      <StackPanel>
        <TextBlock Margin="5" Text="Provincias de España" />
        <StackPanel Orientation="Horizontal">
          <TextBox Height="30" Width="Auto" IsReadOnly="True" Text="Provincia:" 
                Style="{StaticResource EstiloTextBox}" BorderBrush="LightGray" />
          <sdk:AutoCompleteBox Width="250"  Height="30" x:Name="acbProvincias" 
                TextBoxStyle="{StaticResource EstiloTextBox}" 
                ItemContainerStyle="{StaticResource EstiloListBoxItem}" 
                GotFocus="acbProvincias_GotFocus" />
        </StackPanel>
      </StackPanel>
    </Border>
    <Popup x:Name="popUpProvincias" MaxWidth="200">
      <Border Background="LightBlue"
          MouseLeftButtonDown="popUpProvincias_MouseLeftButtonDown">
        <TextBlock Margin="10">
          Cuando escriba le será mostrada una lista con
          las coincidencias.
        </TextBlock>
      </Border>
    </Popup>
  </Grid>
</UserControl>
