Dependency Property for Windows Phone コードスニペット
#wp7dev_jp
依存プロパティのコードスニペット propdp で、最後の引数を訂正するのが毎回面倒なので作ったもの。
public int MyProperty
{
get { return (int)GetValue(MyPropertyProperty); }
set { SetValue(MyPropertyProperty, value); }
}
public static readonly DependencyProperty MyPropertyProperty =
DependencyProperty.Register("MyProperty", typeof(int), typeof(ownerclass), null);
マイ ドキュメントのVisual Studio 2010\Code Snippets\Visual C#\My Code Snippets に置けばOK。
使うときは propwp [tab] で使えます。 (3/9修正)
型と、変数名と、これを張り付けた親クラスを設定すればOK。