title: Popup in style of ContentControl not updating
body: <p>I have a ContentControl with a style that contains a popup that wraps a textbox. I know it sounds a little confusing but I will post some code below. When the caps lock key is on the popup is shown, but when the window is dragged the popup does not move with it. </p>
  
  <p>I need to figure out how to update the location of the popup in they style. </p>
  
  <p>This ContentControl is used on both a window and UserControl so that is why I am trying to address this in the style.</p>
  
  <p>This question differs from some of the others as I am trying to solve it in the style and not code.</p>
  
  <p>The content control:</p>
  
  <pre><code>public class ShowCapLockWarningControler : ContentControl
  {
  
      static ShowCapLockWarningControler()
      {
          DefaultStyleKeyProperty.OverrideMetadata(typeof(ShowCapLockWarningControler), new FrameworkPropertyMetadata(typeof(ShowCapLockWarningControler)));
      }
  
      public static readonly DependencyProperty ShowMessageProperty =
          DependencyProperty.Register(Reflection.GetPropertyName&lt;ShowCapLockWarningControler&gt;(i =&gt; i.ShowMessage), typeof(bool),
                                      typeof(ShowCapLockWarningControler), new PropertyMetadata(false));
  
      public bool ShowMessage
      {
          get { return (bool)GetValue(ShowMessageProperty); }
          set { SetValue(ShowMessageProperty, value); }
      }
  
      public ShowCapLockWarningControler()
      {
          IsKeyboardFocusWithinChanged += (s, e) =&gt; RecomputeShowMessage();
          PreviewKeyDown += (s, e) =&gt; RecomputeShowMessage();
          PreviewKeyUp += (s, e) =&gt; RecomputeShowMessage();
      }
  
      private void RecomputeShowMessage()
      {
          ShowMessage = IsKeyboardFocusWithin &amp;&amp; Console.CapsLock;
      }
  }
  </code></pre>
  
  <p>How its used:</p>
  
  <pre><code>&lt;controls:ShowCapLockWarningControler Grid.Row="1" Grid.Column="2" Style="{DynamicResource CaplockWarning}"&gt;
      &lt;PasswordBox  Width="150" Name="PasswordBox" PasswordChanged="HandlePasswordChanged" VerticalContentAlignment="Center" 
                   KeyDown="HandlePasswordBoxEnterPressed"/&gt;
  &lt;/controls:ShowCapLockWarningControler&gt;
  </code></pre>
  
  <p>The style in the style dictionary:</p>
  
  <pre><code>&lt;Style x:Key="CaplockWarning"  TargetType="{x:Type controls:ShowCapLockWarningControler}"&gt;
      &lt;Setter Property="Template"&gt;
          &lt;Setter.Value&gt;
              &lt;ControlTemplate TargetType="{x:Type controls:ShowCapLockWarningControler}"&gt;
                  &lt;Grid&gt;
                      &lt;ContentPresenter Name="Presenter"/&gt;
                      &lt;Popup Placement="Bottom" PlacementTarget="{Binding ElementName=Presenter}" Name="BalloonPopup"  AllowsTransparency="True"
                             IsOpen="{TemplateBinding ShowMessage}"  &gt;
                          &lt;!-- Visual of the popup--&gt;                      
                      &lt;/Popup&gt;
                  &lt;/Grid&gt;
              &lt;/ControlTemplate&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
  &lt;/Style&gt;
  </code></pre>