You are missing this step:
Q: How is the class instance created?
It depends. By default a new class instance will be created on the first time it is needed, and it will be cached. The Initialize sub of the class must not include any parameter.
The other option is to use XUI.RegisterDesignerClass to assign a specific instance that will be used.
You can get the cached class instance with XUI.GetRegisteredDesignerClass. It is probably a bit obscure for now, but these two methods are very useful.
'before the layout is loaded
dd.Initialize
XUI.RegisterDesignerClass(dd)
Without it, there is no relation between the "dd" variable and the instance that will be created by the designer script.