public override void LoadView()
		{
			base.LoadView();
			
			Utility = new XMUtilities();
			
			Utility.SetCallback (new XMUtilityCallback (OurCallback));
			
			var operandSection = new Section("Operands") {
				new EntryElement("Name: ", "", ""),
				new EntryElement("Operand One: ", "", ""),
				new EntryElement("Operand Two: ", "", ""),
			};
			
			var operationSection = new Section("Operations") {
				new StringElement("Add", Handle_AddOperation),
				new StringElement("Multiply", Handle_MultiplyOperation),
				new StringElement("Hello", Handle_HelloOperation),
				new StringElement("Invoke Callback", Handle_InvokeCallback),
			};
			
			var resultSection = new Section("Result") {
				new StringElement(@"")
			};
			
			var customViewSection = new Section("More Bindings") {
				new StringElement("Go to CustomView!", () => { 
					var c = new CustomViewController();
					
					this.NavigationController.PushViewController(c, true);
				})
			};
			
			this.Root.Add(new Section[] { operandSection, operationSection, resultSection, customViewSection });
		}
Esempio n. 2
0
        public override void LoadView()
        {
            base.LoadView();

            Utility = new XMUtilities();

            Utility.SetCallback(new XMUtilityCallback(OurCallback));

            var operandSection = new Section("Operands")
            {
                new EntryElement("Name: ", "", ""),
                new EntryElement("Operand One: ", "", ""),
                new EntryElement("Operand Two: ", "", ""),
            };

            var operationSection = new Section("Operations")
            {
                new StringElement("Add", Handle_AddOperation),
                new StringElement("Multiply", Handle_MultiplyOperation),
                new StringElement("Hello", Handle_HelloOperation),
                new StringElement("Invoke Callback", Handle_InvokeCallback),
            };

            var resultSection = new Section("Result")
            {
                new StringElement(@"")
            };

            var customViewSection = new Section("More Bindings")
            {
                new StringElement("Go to CustomView!", () => {
                    var c = new CustomViewController();

                    this.NavigationController.PushViewController(c, true);
                })
            };

            this.Root.Add(new Section[] { operandSection, operationSection, resultSection, customViewSection });
        }