Created
August 26, 2014 14:30
-
-
Save taktamur/0cefd75097f951dd9e6b to your computer and use it in GitHub Desktop.
Xamarinで遊ぶ(2) DialogViewController ref: http://qiita.com/paming/items/025ff5d39ed3abd113db
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Root = new RootElement(){ | |
| new Section(){..}, | |
| new Section(){..}, | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Root = new RootElement ("HomeScreen"); | |
| var section1 = new Section ("First Section"); | |
| section1.Add (new StringElement ("Hello", () => { | |
| new UIAlertView ("Hola", "Thanks for tapping!", null, "Continue").Show (); | |
| })); | |
| section1.Add (new EntryElement ("Name", "Enter your name", String.Empty)); | |
| Root.Add (section1); | |
| Root.Add (new Section ("Second Section")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using MonoTouch.Foundation; | |
| using MonoTouch.UIKit; | |
| using MonoTouch.Dialog; | |
| namespace MyTasky.Screens | |
| { | |
| public partial class HomeViewController : DialogViewController | |
| { | |
| public HomeViewController () : base (UITableViewStyle.Grouped, null) | |
| { | |
| Root = new RootElement ("HomeScreen"){ | |
| new Section ("First Section") { | |
| new StringElement ("Hello", () => { | |
| new UIAlertView ("Hola", "Thanks for tapping!", null, "Continue").Show (); | |
| }), | |
| new EntryElement ("Name", "Enter your name", String.Empty) | |
| }, | |
| new Section ("Second Section") { | |
| }, | |
| }; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment