添加 DependencyProperty 注册 Microsoft Corporation 添加注册读写 DependencyProperty 的代码。此代码段必须被添加到从 DependencyObject 派生的类。 wpfdp Expansion
WindowsBase PresentationCore PresentationFramework System.Windows propertyType 替换为属性的类型。 string propertyName 替换为属性的名称。 Prop1 ownertype Control 替换为此代码段要添加到的类的名称。 Window1 defaultValue 替换为属性的默认值。 Nothing