protected override void OnRemoveBehavior() { if (EventProcessor != null) { EventProcessor.DetachEvents(); EventProcessor.Dispose(); EventProcessor = null; } }