protected override void UpdateValue() { object value = GetValue(); if (value is IEventReceiver) { Sender.SetReceiver((IEventReceiver)value); } else if (value == null) { Sender.SetReceiver(null); } }