开发者

Change macro in VisualStudio

开发者 https://www.devze.com 2022-12-30 05:38 出处:网络
The macro \'propdp\' creates a dependency property like this: public int MyProperty { get { return (int)GetValue(MyPropertyProperty); }

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

精彩评论

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