111,092
社区成员




public class Person:DependencyObject
{
public string FirstName
{
get { return (string)GetValue(FirstNameProperty); }
set { SetValue(FirstNameProperty, value); }
}
// Using a DependencyProperty as the backing store for FirstName. This enables animation, styling, binding, etc...
public static readonly DependencyProperty FirstNameProperty =
DependencyProperty.Register("FirstName", typeof(string), typeof(Person), new PropertyMetadata(0));
}
private void Button_Click(object sender, RoutedEventArgs e)
{
Person p = new Person();
}