Deactivate event called on activation- BUG?

Topics: CAB & Smart Client Software Factory
Nov 2, 2006 at 8:11 PM
originally posted by: kgreed

Why would my workitem's OnDeactivate event fire when the user clicks into a control it' the view

I am looking at this bit of code in SimpleWorkItemActivationService for a clue...

public void ChangeStatus(WorkItem item)
{
lock (syncroot)
{
if (item != activeWorkItem && item.Status == WorkItemStatus.Active)
{
if (activeWorkItem != null && activeWorkItem.Status != WorkItemStatus.Terminated)
activeWorkItem.Deactivate();
activeWorkItem = item;
}
}
}
Nov 7, 2006 at 5:56 AM
originally posted by: PauloMorgado

See if this helps:

http://msmvps.com/blogs/paulomorgado/archive/2006/11/04/An-Hierarchical-CAB-WorkItem-Activation-Service.aspx