MonoTouch.Dialog.RootElement.Add C# (CSharp) Method

Add() public method

public Add ( IEnumerable
sections ) : void
sections IEnumerable
return void
		public void Add (IEnumerable<Section> sections)
		{
			foreach (var s in sections)
				Add (s);
		}
		

Same methods

RootElement::Add ( Section section ) : void

Usage Example

示例#1
0
        public LabelListScreen(IList<string> labels)
            : base(UITableViewStyle.Grouped, null)
        {
            // Navigation
            NavigationItem.LeftBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Cancel, (sender, args) =>
            {
                NavigationController.DismissViewController(true, null);
            });
            NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Done, DoneButtonClicked);

            Root = new RootElement("");
            var labelSection = new Section();
            Root.Add(labelSection);
            foreach (var label in labels)
            {
                var element = new StringElement(label);
                element.Tapped += () => {};
                labelSection.Add(element);
            }

            var customSection = new Section();
            Root.Add(customSection);
            var customElement = new StringElement("Add Custom Label");
            customElement.Tapped += () => {};
            customSection.Add(customElement);
        }
All Usage Examples Of MonoTouch.Dialog.RootElement::Add