<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="MainTestApplication.SearchBox" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:MainTestApplication">
  <Grid x:Name="LayoutRoot">
    
    <!-- rounded border -->
    <Border x:Name="_border" Background="White" BorderBrush="LightGray" BorderThickness="1 1 2 2" CornerRadius="8" Padding="6 0">

      <StackPanel Orientation="Horizontal">

        <!-- search icon -->
        <Image x:Name="_imgSearch" Source="resources/search.png" Stretch="None" />

        <!-- text to search for -->
        <local:TextBoxNoFocus x:Name="_txtSearch" Text="Search" Width="160" BorderThickness="0" VerticalContentAlignment="Center" TextChanged="_txtSearch_TextChanged" />

        <!-- button to clear search text -->
        <Image x:Name="_imgClear" Source="resources/clear.png" Stretch="None" MouseLeftButtonDown="_imgClear_MouseLeftButtonDown" />
      </StackPanel>
    </Border>
  </Grid>
</UserControl>