title: WPF does not seem to find a custom attached property
body: <p>I am trying to bind a property (Button.Background) to a property on my custom attached property.</p>
  
  <p>In a C# file I have</p>
  
  <pre><code>public static class Square
  {
      public static readonly DependencyProperty PlayerProperty =
          DependencyProperty.RegisterAttached
          (
              name           : "Player",
              propertyType   : typeof(Player),
              ownerType      : typeof(UIElement),
              defaultMetadata: new FrameworkPropertyMetadata(null)
          );
  
      public static Player GetPlayer(UIElement element)
      {
          return (Player)element.GetValue(PlayerProperty);
      }
  
      public static void SetPlayer(UIElement element, Player player)
      {
          element.SetValue(PlayerProperty, player);
      }
  
      // Other attached properties
  }
  </code></pre>
  
  <p>A snippet of my XAML is</p>
  
  <pre><code>&lt;Grid Name="board" Grid.Row="1" Grid.Column="1"&gt;
      &lt;Grid.Resources&gt;
          &lt;Style TargetType="{x:Type Button}"&gt;
              &lt;Setter Property="Height" Value="20" /&gt;
              &lt;Setter Property="Width" Value="20" /&gt;
              &lt;Setter Property="BorderThickness" Value="3" /&gt;
              &lt;Setter Property="Background"
                  Value="{Binding Path=(l:Square.Player).Brush, Mode=OneWay}" /&gt;
          &lt;/Style&gt;
      &lt;/Grid.Resources&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>This is the error I get:</p>
  
  <blockquote>
    <p>Cannot convert string '(l:Square.Player).Brush' in attribute 'Path' to object of type 'System.Windows.PropertyPath'.  </p>
    
    <p>Property path is not valid. 'Square' does not have a public property named 'Player'.  </p>
    
    <p>Error at object 'System.Windows.Data.Binding' in markup file 'Gobang.Gui;component/mainwindow.xaml' Line 148 Position 59.</p>
  </blockquote>
  
  <p>But since <code>Player</code> is an attached property which is on <code>Square</code>, the above code should work, right?</p>