コード例 #1
0
 /// <summary>
 /// Adds the item.
 /// </summary>
 /// <param name="item">Item.</param>
 public void AddItem(SourceListItem item)
 {
     if (Data != null)
     {
         Data.Items.Add(item);
     }
 }
コード例 #2
0
 /// <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);
     }
 }
コード例 #3
0
        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);
        }
コード例 #4
0
 /// <summary>
 /// Removes the item.
 /// </summary>
 /// <param name="item">Item.</param>
 public void RemoveItem(SourceListItem item)
 {
     _items.Remove(item);
 }
コード例 #5
0
 /// <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);
 }
コード例 #6
0
 /// <summary>
 /// Adds the item.
 /// </summary>
 /// <param name="item">Item.</param>
 public void AddItem(SourceListItem item)
 {
     _items.Add(item);
 }