prop+tab 自动创建 public int MyProperty { get; set; }
propfull+tab 自动创建
private int myVar;
public int MyProperty
{
get { return myVar; }
set { myVar = value; }
}
propdp+tab 自动创建
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 PropertyMetadata(0));