why can not Trigger the event when sender is "ClearCanvas.Desktop.Workspace"
obj.InternalActiveChanged += delegate(object sender, EventArgs e)
{
OnItemActivationChangedInternal(new ItemEventArgs((T)sender));
};
can not exec the event fun:
protected sealed override void OnItemActivationChangedInternal(ItemEventArgs args)
{
if (args.Item.Active)
{
// activated
Workspace lastActive = _activeWorkspace;
// set this prior to firing any events, so that a call to ActiveWorkspace property will return correct value
_activeWorkspace = args.Item;
if (lastActive != null)
{
lastActive.RaiseActiveChanged();
}
_activeWorkspace.RaiseActiveChanged();
}
}
so activeWorkspace is null throw the execption.
please tell me?