/// <summary> /// Programmatically selects an <see cref="iItem"/>. /// </summary> /// <param name="collection">The collection to check for a SelectEventHandler.</param> /// <param name="item">The <see cref="iItem"/> that is to be selected.</param> public void Select(iCollection <iItem> collection, iItem item) { if (collection.HasSelectEventHandler) { collection.ItemSelected(item); } else if (item != null && item.Link != null && item.Link.Address != null) { iApp.Navigate(item.Link, View); } }
/// <summary> /// Creates a deep-copy clone of this instance. /// </summary> public iItem Clone() { iItem i = (iItem)MemberwiseClone(); if (Icon != null) { i.Icon = Icon.Clone(); } if (Link != null) { i.Link = Link.Clone(); } if (Button != null) { i.Button = Button.Clone(); } return(i); }