Thursday, August 21, 2008, 02:45 PM
Posted by Ruben Steins
I'm a big fan of Visual Studio code snippets and keyboard shortcuts. So I really like typing Posted by Ruben Steins
prop followed by two tabs to quickly generate a property. Today I found out a new one, specifically for WPF:
propdp followed by double-tab gives you a Dependency Property and generates the following code:public int MyProperty
{
get { return (int)GetValue(MyPropertyProperty); }
set { SetValue(MyPropertyProperty, value); }
}
// ... comment ...
public static readonly DependencyProperty MyPropertyProperty =
DependencyProperty.Register("MyProperty", typeof(int), typeof(ownerclass), new UIPropertyMetadata(0));
You can fill in some fields, such as the type and the ownerclass, but besides that you don't have to type anything.




( 2.7 / 18 )

Calendar



