title: Create Properties or DependencyProperties that have Code Completion in XAML
body: <p>I am trying to create DependencyProperties that have a nice drop down code completion when using them in the XAML-editor in Visual Studio.</p>
  
  <p>Many default SilverLight framework properties have such completion, e.g., <code>Background</code> or <code>BorderBrush</code>. Also, <code>Boolean</code> Properties show the <code>True</code>/<code>False</code> selection in the XAML-editor. The same holds true for DependencyProperties, such as <code>Canvas.Top</code> and <code>Canvas.Left</code>, etc.</p>
  
  <p>I tried to define my own DependencyProperties of type <code>Color</code> or <code>Boolean</code>, since i believed that default types like Color, Brush, and Boolean might get completion for free. This did not happen.</p>
  
  <p>I believe that i have to define some annotations for my properties, but did not find an example since the Silverlight SDK only shows the public API in Visual Studio, and not the internals.</p>
  
  <p>Do you have an idea, how to get code completed Properties?</p>
  
  <p><strong>Update:</strong> Here is an example of what I am trying to do in <strong>SilverLigth 3</strong> (!) I just talked to a colleage, and he believes that the problem is related to Silverlight 3 and the old non-VS2010-XAML-editor in VS 2008.</p>
  
  <p><strong>XAML:</strong></p>
  
  <pre><code>&lt;Grid x:Name="LayoutRoot"&gt;
    &lt;Border test:PropTest.Test="Blue"&gt;
      &lt;TextBlock Text="123"/&gt;
    &lt;/Border&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p><strong>Code behind</strong></p>
  
  <pre><code>namespace PropTest{
    public class PropTest : DependencyObject {
      public static readonly DependencyProperty TestProperty = DependencyProperty.RegisterAttached(
        "Test", typeof(Color), typeof(PropTest), new PropertyMetadata(Colors.Red));
  
      public static void SetTest(DependencyObject obj, Color color){
        (obj as Border).Background = new SolidColorBrush(color);
      }
      public static Color GetTest(DependencyObject obj){
        return Colors.Red;
      }
    }
  }
  </code></pre>
  
  <p>This example is compileable/runnable, but I want to write an API using <code>DependencyProperties</code> and not an application and thus I want code completion for my API. :)</p>