title: Need help with caliburn Message.Attach when TextBox gets focus
body: <p>I have a TextBox that I am setting the focus on using an attached property bound to a property of the view model. The attached property calls "UIElement.Focus()" to set the focus. The problem is when the TextBox receives focus in this manner the "GotFocus" event doesn't fire. I am using Caliburn.Micro's Message.Attach to handle the event. Any ideas?</p>
  
  <p>Here is the TextBox.</p>
  
  <pre><code>&lt;TextBox x:Name="Test"
           Grid.Column="0"
           Text="{Binding Test, Converter={StaticResource TestToStringConverter}}"
           AttachedProperties:FocusExtension.IsFocused="{Binding IsTestFocused}"
           cal:Message.Attach="[Event GotFocus] = [Action OnGotFocus($eventargs)]; /&gt;
  </code></pre>
  
  <p>Here is the Attached Property (found on SO).</p>
  
  <pre><code>public static class FocusExtension
  {
      public static bool GetIsFocused(DependencyObject obj)
      {
          return (bool) obj.GetValue(IsFocusedProperty);
      }
  
      public static void SetIsFocused(DependencyObject obj, bool value)
      {
          obj.SetValue(IsFocusedProperty, value);
      }
  
      public static readonly DependencyProperty IsFocusedProperty = 
          DependencyProperty.RegisterAttached("IsFocused", typeof (bool), typeof (FocusExtension),
                                              new UIPropertyMetadata(false, OnIsFocusedPropertyChanged));
  
      private static void OnIsFocusedPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
      {
          var uie = (UIElement)d;
  
          if ((bool)e.NewValue)
          {
              uie.Focus();
          }
      }
  }
  </code></pre>