在Visual Studio中更改宏

时间:2010-05-12 16:19:23

标签: visual-studio visual-studio-2008 macros

宏'propdp'创建一个依赖属性,如下所示:

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));

我想稍微改变一下。看起来像这样:

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));

可以这样做吗?有谁知道在哪里改变这个?

1 个答案:

答案 0 :(得分:2)

转到C:\ Program Files \ Microsoft Visual Studio 9.0 \ VC#\ Snippets \ 1033 \ NetFX30

在那里你会找到propa.snippet和propdp.snippet。

编辑以执行您想要的操作...

相关问题