在再次运行下面的代码之前,我如何知道“状态”DependencyProperty 是否已注册?
代码:
public readonly DependencyProperty StatusProperty ;
public string Status
{
get { return (string)GetValue(StatusProperty); }
set { SetValue(StatusProperty, value); }
}
StatusProperty = DependencyProperty.Register("Status", typeof(string), typeof(CWindow), new PropertyMetadata());