2010-05-12 3 views
2

Le « propdp de » macro crée une propriété de dépendance comme ceci:changement macro dans VisualStudio

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

Je voudrais changer un peu. Pour ressembler à ceci:

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

Est-ce que cela peut être fait? Est-ce que quelqu'un sait où changer cela?

Répondre

2

Aller à C: \ Program Files \ Microsoft Visual Studio 9.0 \ VC# \ Snippets \ 1033 \ NetFX30

Vous y trouverez propa.snippet et propdp.snippet. Éditer pour faire ce que vous voulez ...

Questions connexes