Example #1
0
 public void AddItem(SourceListItem item)
 {
     if (Data != null)
     {
         Data.Items.Add(item);
     }
 }
Example #2
0
 internal void RaiseItemSelected(SourceListItem item)
 {
     // Inform caller
     if (this.ItemSelected != null)
     {
         this.ItemSelected(item);
     }
 }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            MenuListView.Initialize();
            var menuItems = new SourceListItem("Pages");

            menuItems.AddItem("Home", "home.png", () => { ViewModel.ShowHomeCommand.Execute(); });
            menuItems.AddItem("Help", "help.png", () => { ViewModel.ShowHelpCommand.Execute(); });
            menuItems.AddItem("Settings", "settings.png", () => { ViewModel.ShowSettingCommand.Execute(); });


            // TODO: There is a really odd bug here, if the Window covers the super category "Pages", the buttons
            // will stop working.

            MenuListView.AddItem(menuItems);
            MenuListView.ReloadData();
            MenuListView.ExpandItem(null, true);
        }
 public void RemoveItem(SourceListItem item)
 {
     _items.Remove(item);
 }
 public void Insert(int n, SourceListItem item)
 {
     _items.Insert(n, item);
 }
 public void AddItem(SourceListItem item)
 {
     _items.Add(item);
 }