protected override void OnMouseUp(MouseEventArgs e) { base.OnMouseUp(e); IItemsElement itemsElement = (IItemsElement)null; for (RadElement parent = this.Parent; parent != null && itemsElement == null; parent = parent.Parent) { itemsElement = parent as IItemsElement; } itemsElement?.ItemClicked((RadItem)this); }
protected override void OnMouseUp(MouseEventArgs e) { base.OnMouseUp(e); IItemsElement buttonGroup = null; for (RadElement parent = this.Parent; parent != null && buttonGroup == null; parent = parent.Parent) { buttonGroup = parent as IItemsElement; } if (buttonGroup != null) { buttonGroup.ItemClicked(this); } }