【问题标题】:Change macro in VisualStudio在 Visual Studio 中更改宏
【发布时间】:2010-05-12 16:19:23
【问题描述】:

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

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

【问题讨论】:

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


    【解决方案1】:

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

    在那里你会找到 propa.sn-p 和 propdp.sn-p。

    编辑做你想做的事...

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-12
      • 1970-01-01
      • 2011-04-21
      相关资源
      最近更新 更多