public MainPage MyProperty { get { return (MainPage)GetValue(MyPropertyProperty); } set { SetValue(MyPropertyProperty, value); } }public static readonly DependencyProperty MyPropertyProperty = DependencyProperty.Register("MyProperty", typeof(MainPage), typeof(MyUserControl2), new PropertyMetadata(new MainPage()));其中 MainPage 为页面,MyUserControl2为用户控件,可是PropertyMetadata这里怎么写呢?总是报错呢?
FFIVE
慕容708150
守着星空守着你