Web- und Software Development

DependencyProperty – Visual Studio Snippet

Written By: Mario Priebe - Jul• 31•10

Folgendes Snippet erstellt bei der Eingabe von dpprop <tab> ein DependencyProperty

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#region DependencyProperty: propertyName
public propertyType propertyName
    {
        get
        {
            return (propertyType)GetValue(propertyNameProperty);
        }
        set
        {
            SetValue(propertyNameProperty, value);
        }
    }
 
    public static readonly DependencyProperty propertyNameProperty =
        DependencyProperty.Register("propertyName", typeof(propertyType), typeof(ownerType),
        new FrameworkPropertyMetadata());
#endregion

Kopiert wird das Snippet unter VS 2008 nach:

%Userprofile%\Eigene Dateien\Visual Studio 2008\Code Snippets\Visual C#\My Code Snippets\

oder unter VS 2005 nach

%Userprofile%\Eigene Dateien\Visual Studio 2005\Code Snippets\Visual C#\My Code Snippets\

Download snippet (.txt Erweiterung muss entfernt werden)

Viel Spaß damit

Ähnliche Beiträge

You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.