/// <summary> /// Adds the item. /// </summary> /// <param name="item">Item.</param> public void AddItem(SourceListItem item) { if (Data != null) { Data.Items.Add(item); } }
/// <summary> /// Raises the item selected. /// </summary> /// <param name="item">Item.</param> internal void RaiseItemSelected(SourceListItem item) { // Inform caller if (this.ItemSelected != null) { this.ItemSelected(item); } }
public override void ViewDidLoad() { base.ViewDidLoad(); // Populate source list SourceList.Initialize(); var library = new SourceListItem("Library"); library.AddItem("Venues", "house.png", () => { Console.WriteLine("Venue Selected"); }); library.AddItem("Singers", "group.png"); library.AddItem("Genre", "cards.png"); library.AddItem("Publishers", "box.png"); library.AddItem("Artist", "person.png"); library.AddItem("Music", "album.png"); SourceList.AddItem(library); // Add Rotation var rotation = new SourceListItem("Rotation"); rotation.AddItem("View Rotation", "redo.png"); SourceList.AddItem(rotation); // Add Kiosks var kiosks = new SourceListItem("Kiosks"); kiosks.AddItem("Sign-in Station 1", "imac"); kiosks.AddItem("Sign-in Station 2", "ipad"); SourceList.AddItem(kiosks); // Display side list SourceList.ReloadData(); SourceList.ExpandItem(null, true); }
/// <summary> /// Removes the item. /// </summary> /// <param name="item">Item.</param> public void RemoveItem(SourceListItem item) { _items.Remove(item); }
/// <summary> /// Insert the specified n and item. /// </summary> /// <param name="n">N.</param> /// <param name="item">Item.</param> public void Insert(int n, SourceListItem item) { _items.Insert(n, item); }
/// <summary> /// Adds the item. /// </summary> /// <param name="item">Item.</param> public void AddItem(SourceListItem item) { _items.Add(item); }