La déclaration en WinRT est différente de WPF / Silverlight.

Elle différe lors de la phase Register sur l’objet static DependencyProperty.

On note qu’en WPF / SL4, le Register prend un Type (typeof(TOTO)) comme argument, alors qu’en WinRT, il prend une chaine de caractères.

Note : Pour moi, ceci est un comportement imputable à la CTP de WinRT, je serai surpris que ce soit encore le cas lors de la RTM. My 2 Cents Smile

WPF:

public int MatchesCount
{     get { return (int)GetValue(MatchesCountProperty); }     set { SetValue(MatchesCountProperty, value); }
}
 
public static readonly DependencyProperty MatchesCountProperty =     DependencyProperty.Register(
              "MatchesCount", 
               typeof(int), 
               typeof(WidthMatchConverter), 
new PropertyMetadata(0));

WinRT:

public int MatchesCount
{
    get { return (int)GetValue(MatchesCountProperty); }
    set { SetValue(MatchesCountProperty, value); }
}

public static readonly DependencyProperty MatchesCountProperty =
    DependencyProperty.Register(
               « MatchesCount »,
               « Int32″,
                « WidthMatchConverter »,

                new PropertyMetadata(0));