开发者

Change macro in VisualStudio

The macro 'propdp' creates a dependency property like this:

public int MyProperty
{
    get { return (int)GetValue(MyPropertyProperty); }
    set { SetValue(MyPropertyProperty, value); }
}

// Using a DependencyProperty as the backing store for MyProperty.  This enables animation, styling, binding, etc...
public static readonly DependencyProperty MyPropertyProperty =
    DependencyProperty.Register("MyProperty", typeof(int), typeof(ownerclass), new UIPropertyMetadata(0));

I would like to change it a bit. To look like this:

public int MyProperty
{
    get { return (int)GetValue(MyPropertyProperty); }
   开发者_如何学运维 set { SetValue(MyPropertyProperty, value); }
}
public static readonly DependencyProperty MyPropertyProperty = DependencyProperty.Register("MyProperty", typeof(int), typeof(ownerclass), new UIPropertyMetadata(0));

Can this be done? Does anyone know where to change this?


Go to C:\Program Files\Microsoft Visual Studio 9.0\VC#\Snippets\1033\NetFX30

There you will find propa.snippet and propdp.snippet.

Edit to do what you want...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜