110,534
社区成员
发帖
与我相关
我的任务
分享
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();
}