Fix naming in custom-dependency-properties snippet (#1204)

* Fix naming

* Simplify identifier assignment

* Simplify identifier assignment
This commit is contained in:
Tris Shores
2021-11-05 08:19:39 -07:00
committed by GitHub
parent 7d5a5bd5b9
commit b82ed37802
4 changed files with 15 additions and 27 deletions
@@ -17,8 +17,9 @@
'<RegisterDependencyPropertyWithWrapper>
'<RegisterDependencyProperty>
' Register a dependency property with the specified property name,
' property type, owner type, and property metadata.
Private Shared ReadOnly s_aquariumGraphicProperty As DependencyProperty =
' property type, owner type, and property metadata. Store the dependency
' property identifier as a public static readonly member of the class.
Public Shared ReadOnly AquariumGraphicProperty As DependencyProperty =
DependencyProperty.Register(
name:="AquariumGraphic",
propertyType:=GetType(Uri),
@@ -27,10 +28,6 @@
defaultValue:=New Uri("http://www.contoso.com/aquarium-graphic.jpg"),
flags:=FrameworkPropertyMetadataOptions.AffectsRender,
propertyChangedCallback:=New PropertyChangedCallback(AddressOf OnUriChanged)))
' Store the dependency property identifier as a static member of the class.
Public Shared ReadOnly AquariumGraphicProperty As DependencyProperty =
s_aquariumGraphicProperty
'</RegisterDependencyProperty>
' Declare a read-write property.