Publish Event poblem

Topics: CAB & Smart Client Software Factory
Nov 8, 2005 at 11:47 PM
originally posted by: cpiock

i have a usercontrol that is composed of some controls and one other usercontrol. The usercontrol is the employeelist and the included usercontrol is the employeedata. Both usercontrols has the same event publication:
EventPublication("topic://SmartPart/DataChanged", PublicationScope.Global)
public event EventHandler<DataEventArgs<bool>> DataChanged;
On execution the DataChanged Event of the included Usercontrol EmployeeData is always null. But if i use the same usercontrol as a standalone usercontol the event is assigned well.
Is this a bug or a feature :)
thx for help
Nov 9, 2005 at 9:52 AM
originally posted by: BradWilsonMSFT

Please decorate all controls that require dependency injection with the SmartPart attribute. This will make sure everything gets wired up properly.
Jan 1, 2006 at 5:30 PM
originally posted by: SUBATBLOOMINGTON

even after decorating with the smartpart attribute the event is not been propagated.. please help
Jan 5, 2006 at 6:04 AM
originally posted by: DLorenz

You are using WorkItem.SmartParts.AddNew(Of ...) for this, right?
Feb 4, 2006 at 7:59 AM
originally posted by: kmdigilio

This was exactly the answer I needed. Thank You