title: How to get a VisualBrush to fill its container in Xaml?
body: <p>I have textbox I am using for search, and I want to have hint text inside of it prompting the user to search as well as a magnifying glass icon.  I am using a <code>VisualBrush</code> style, and I want the label at the far left and the image at the far right, but I can't get the contents of the <code>VisualBrush</code> to fill the entire text box.  They are either stuck togethr at the left, or stuck together on the right, depending on how I set the <code>AlignmentX</code> on my <code>VisualBrush</code>.  I have tried using <code>StackPanel</code>, <code>DockPanel</code>, and <code>Grid</code> and none of them will fill the whole textbox and let me have elements at opposite ends of the text box.</p>
  
  <pre><code>&lt;VisualBrush x:Key="CueBannerBrush"
               AlignmentX="Left"
               AlignmentY="Center"
               Stretch="None"&gt;
    &lt;VisualBrush.Visual&gt;
      &lt;DockPanel HorizontalAlignment="Stretch"&gt;
        &lt;Label Content="Begin typing to search"
               Foreground="LightGray"
               DockPanel.Dock="Left" /&gt;
        &lt;Image Source="/WPF;component/Icons/32/Modern3D/objects/magnifier.png"
               Height="20"
               DockPanel.Dock="Right" /&gt;
      &lt;/DockPanel&gt;
    &lt;/VisualBrush.Visual&gt;
  &lt;/VisualBrush&gt;
  </code></pre>
  
  <p>Produces this output:</p>
  
  <p><img src="https://i.stack.imgur.com/HmCjZ.png" alt="enter image description here"></p>
  
  <p>Any suggestions for how I can get the child of the brush to fill the whole text box and separate the hint text from the magnifying glass icon?</p>