InitComplexProperty method

void InitComplexProperty(
  1. ComplexProperty complexProperty
)
Initializes a ComplexProperty instance. When a property is inserted into the bag, it needs to be initialized in order for changes that occur on that property to be properly detected and dispatched. The ComplexProperty instance to initialize.

Implementation

/* private */
void InitComplexProperty(ComplexProperty complexProperty) {
  if (complexProperty != null) {
    complexProperty.addOnChangeEvent(this.PropertyChanged);

    if (complexProperty is IOwnedProperty) {
      IOwnedProperty ownedProperty = complexProperty as IOwnedProperty;

      ownedProperty.Owner = this.Owner;
    }
  }
}