public void DemoContainerStyle () { var root = new RootElement ("Container Style") { new Section ("A") { new StringElement ("Another kind of"), new StringElement ("TableView, just by setting the"), new StringElement ("Style property"), }, new Section ("C"){ new StringElement ("Chaos"), new StringElement ("Corner"), }, #warning inline LINQ source removed /* * new Section ("Style"){ from a in "Hello there, this is a long text that I would like to split in many different nodes for the sake of all of us".Split (' ') select (Element) new StringElement (a) } */ }; var dvc = new DialogViewController (root, true) { Style = UITableViewStyle.Plain }; navigation.PushViewController (dvc, true); }
public override void ViewDidLoad() { base.ViewDidLoad(); // ios7 layout if (RespondsToSelector(new Selector("edgesForExtendedLayout"))) EdgesForExtendedLayout = UIRectEdge.None; Root = new RootElement("The Dialog") { new Section("Strings") { new EntryElement("Hello").Bind(this, "Value Hello"), new EntryElement("Hello2").Bind(this, "Value Hello2"), new StringElement("Test").Bind(this, "Value Combined"), new BooleanElement("T or F", false).Bind(this, "Value Option1"), new BooleanElement("T or F:", true).Bind(this, "Value Option1"), }, new Section("Dates") { new DateElement("The Date", DateTime.Today).Bind(this, "Value TheDate"), new TimeElement("The Time", DateTime.Today).Bind(this, "Value TheDate"), new StringElement("Actual").Bind(this, "Value TheDate") } }; }
public SponsorsView() : base(UITableViewStyle.Plain) { Root = new RootElement("Sponsors"); RefreshRequested += (s, e) => ViewModel.RefreshDataCommand.Execute(null); }
/// <summary> /// Populates the page with sessions, grouped by time slot /// that are marked as 'favorite' /// </summary> protected override void PopulateTable() { // get the sessions from the database var sessions = BL.Managers.SessionManager.GetSessions (); var favs = BL.Managers.FavoritesManager.GetFavorites(); // extract IDs from Favorites query List<string> favoriteIDs = new List<string>(); foreach (var f in favs) favoriteIDs.Add (f.SessionKey); // build list, matching the Favorite.SessionKey with actual // Session.Key rows - which might have moved if the data changed var root = new RootElement ("Favorites") { from s in sessions where favoriteIDs.Contains(s.Key) group s by s.Start.Ticks into g orderby g.Key select new Section (new DateTime (g.Key).ToString ("dddd HH:mm")) { from hs in g select (Element) new SessionElement (hs) }}; if(root.Count == 0) { var section = new Section("No favorites") { new StyledStringElement("Touch the star to favorite a session") }; root.Add(section); } Root = root; }
private void CreateOriginals(RootElement root) { originalSections = root.Sections.ToArray (); originalElements = new Element [originalSections.Length][]; for (int i = 0; i < originalSections.Length; i++) originalElements [i] = originalSections [i].Elements.ToArray (); }
public override void ViewDidLoad() { base.ViewDidLoad(); HeaderView.SetImage(null, Images.Avatar); Title = ViewModel.Name; ViewModel.Bind(x => x.User, x => { var name = x.FirstName + " " + x.LastName; HeaderView.SubText = string.IsNullOrWhiteSpace(name) ? x.Username : name; HeaderView.SetImage(new Avatar(x.Avatar).ToUrl(128), Images.Avatar); RefreshHeaderView(); var followers = new StyledStringElement("Followers", () => ViewModel.GoToFollowersCommand.Execute(null), Images.Heart); var events = new StyledStringElement("Events", () => ViewModel.GoToEventsCommand.Execute(null), Images.Event); var organizations = new StyledStringElement("Groups", () => ViewModel.GoToGroupsCommand.Execute(null), Images.Group); var repos = new StyledStringElement("Repositories", () => ViewModel.GoToRepositoriesCommand.Execute(null), Images.Repo); var members = new StyledStringElement("Members", () => ViewModel.GoToMembersCommand.Execute(null), Images.Team); var midSec = new Section(new UIView(new CGRect(0, 0, 0, 20f))) { events, organizations, members, followers }; Root = new RootElement(Title) { midSec, new Section { repos } }; }); // if (!ViewModel.IsLoggedInUser) // NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Action, (s, e) => ShowExtraMenu()); }
RootElement CreateNewRoot(IEnumerable<IGrouping<string, Account>> accountsByGroup) { var root = new RootElement ("My Accounts"); var sections = from _group in accountsByGroup select new Section () { // i.e.: Deposits from account in _group select new AccountRootElement(account,true, StyleTransactionsScreen) { new Section() // Section for Account Header { new AccountElement(account, false) as Element, }, new Section("Transactions") // Section for Transactions { // account.Transactions.Select(tx=> new StyledStringElement(tx.Description, string.Format (@"{0:M/d hh:mm tt} {1:C}",tx.OccuredOn, tx.Amount),UITableViewCellStyle.Subtitle) as Element), account.Transactions.Select(tx=> new TransactionElement(tx) as Element), }, } as Element }; root.Add (sections); return root; }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); var bindings = this.CreateInlineBindingTarget<FirstViewModel>(); var passwordElement = new EntryElement("Password", "Enter Password").Bind(bindings, vm => vm.PasswordProperty); passwordElement.Password = true; Root = new RootElement("Example Root") { new Section("Your details") { new EntryElement("Login", "Enter Login name").Bind(bindings, vm => vm.TextProperty), passwordElement, }, new Section("Your options") { new BooleanElement("Remember me?").Bind(bindings, vm => vm.SwitchThis), new CheckboxElement("Upgrade?").Bind(bindings, vm => vm.CheckThis), }, new Section("Action") { new ButtonElement("Go").Bind(bindings, element => element.SelectedCommand, vm => vm.GoCommand) }, new Section("Debug out:") { new StringElement("Login is:").Bind(bindings, vm => vm.TextProperty), new StringElement("Password is:").Bind(bindings, vm => vm.PasswordProperty), new StringElement("Remember is:").Bind(bindings, vm => vm.SwitchThis), new StringElement("Upgrade is:").Bind(bindings, vm => vm.CheckThis), }, }; }
private void Initialize() { Root = new RootElement("Flurry Analytics Portable") { new Section("Basics") { new StringElement("Flurry Supported").Bind(this, "Value IsFlurrySupported"), new StringElement("Flurry Version").Bind(this, "Value FlurryVersion"), new StringElement("Flurry API Key").Bind(this, "Value FlurryApiKey"), }, new Section("User Information") { new EntryElement("User Id", "enter user id").Bind(this, "Value UserId"), new EntryElement("User Age", "enter user age").Bind(this, "Value UserAge, Converter=Int"), new SimplePickerElement("User Gender", null, null).Bind(this, "Value UserGender; Entries UserGender, Converter=EnumToEnumerable") }, new Section("Location") { new StringElement("Latitude").Bind(this, "Value UserLocation.Coordinates.Latitude, Mode=TwoWay"), new StringElement("Longitude").Bind(this, "Value UserLocation.Coordinates.Longitude"), new StringElement("Accuracy").Bind(this, "Value UserLocation.Coordinates.Accuracy"), }, new Section("Events") { new StyledStringElement("Show Events") { Accessory = UITableViewCellAccessory.DisclosureIndicator, Font = UIFont.SystemFontOfSize(UIFont.LabelFontSize) }.Bind(this, "SelectedCommand ShowEventsCommand"), }, }; }
protected override void OnLoadingComplete() { base.OnLoadingComplete(); var bindings = this.CreateInlineBindingTarget<SpeakerViewModel>(); Root = new RootElement("Speaker Info") { new Section { new TransparentMultilineElement { Font = AppStyles.EntityTitleFont }.Bind(bindings, el => el.Caption, vm => vm.Speaker.Name) }, new Section { new StyledStringElement("Send Email") { Accessory = UITableViewCellAccessory.DisclosureIndicator, ShouldDeselectAfterTouch = true, Image = UIImage.FromFile("compose.png"), BackgroundColor = AppStyles.SemiTransparentCellBackgroundColor, TextColor = AppStyles.ListTitleColor, Font = AppStyles.ListTitleFont }.Bind(bindings, el => el.SelectedCommand, vm => vm.EmailSpeakerCommand) }, new Section { new TransparentMultilineElement() .Bind(bindings, el => el.Caption, vm => vm.Speaker.Bio, "MultiLine") } }; Root.UnevenRows = true; }
private void ResetDisplay() { string addressString = ViewModel.Customer.PrimaryAddress != null ? ViewModel.Customer.PrimaryAddress.ToString() : string.Empty; var root = new RootElement("Customer Info") { new Section("Contact Info") { new StringElement("ID").Bind(this, "Value Customer.ID"), new StringElement("Name").Bind(this, "Value Customer.Name"), new StringElement("Website").Bind(this, "Value Customer.Website; SelectedCommand ShowWebsiteCommand"), new StringElement("Primary Phone").Bind(this, "Value Customer.PrimaryPhone; SelectedCommand CallCustomerCommand"), }, new Section("General Info") { new StyledMultilineElement("Address").Bind(this, "Value Customer.PrimaryAddress; SelectedCommand ShowOnMapCommand"), //new StringElement("Previous Orders ", ViewModel.Customer.Orders != null ? ViewModel.Customer.Orders.Count.ToString() : string.Empty), //new StringElement("Other Addresses ", ViewModel.Customer.Addresses != null ? ViewModel.Customer.Addresses.Count.ToString() : string.Empty), //new StringElement("Contacts ", ViewModel.Customer.Contacts != null ? ViewModel.Customer.Contacts.Count.ToString() : string.Empty), }, }; root.UnevenRows = true; Root = root; }
public override void ViewDidLoad() { base.ViewDidLoad(); var root = new RootElement(Title) { new Section { new MultilinedElement("CodeBucket") { Value = About, CaptionColor = Theme.CurrentTheme.MainTitleColor, ValueColor = Theme.CurrentTheme.MainTextColor } }, new Section { new StyledStringElement("Source Code", () => UIApplication.SharedApplication.OpenUrl(new NSUrl("https://github.com/thedillonb/CodeBucket"))) }, new Section(String.Empty, "Thank you for downloading. Enjoy!") { new StyledStringElement("Follow On Twitter", () => UIApplication.SharedApplication.OpenUrl(new NSUrl("https://twitter.com/Codebucketapp"))), new StyledStringElement("Rate This App", () => UIApplication.SharedApplication.OpenUrl(new NSUrl("https://itunes.apple.com/us/app/codebucket/id551531422?mt=8"))), new StyledStringElement("App Version", NSBundle.MainBundle.InfoDictionary.ValueForKey(new NSString("CFBundleVersion")).ToString()) } }; root.UnevenRows = true; Root = root; }
private void Core() { var rootStyles = new RootElement ("Add New Styles"); var styleHeaderElement = new Section ("Style Header"); var manualEntryRootElement = new RootElement ("Manual Entry"); styleHeaderElement.Add (manualEntryRootElement); var quickFillElement = new Section ("Quick Fill"); var womenTops = new RootElement ("Womens Tops"); var womenOutwear = new RootElement ("Womens Outerwear"); var womenSweaters = new RootElement ("Womens Sweaters"); quickFillElement.AddAll (new [] { womenTops, womenOutwear, womenSweaters }); rootStyles.Add (new [] { styleHeaderElement, quickFillElement }); // DialogViewController derives from UITableViewController, so access all stuff from it var rootDialog = new DialogViewController (rootStyles); rootDialog.NavigationItem.BackBarButtonItem = new UIBarButtonItem("Back", UIBarButtonItemStyle.Bordered, null); EventHandler handler = (s, e) => { if(_popover != null) _popover.Dismiss(true); }; rootDialog.NavigationItem.SetLeftBarButtonItem(new UIBarButtonItem("Cancel", UIBarButtonItemStyle.Bordered, handler), true); rootDialog.NavigationItem.SetRightBarButtonItem(new UIBarButtonItem("Create", UIBarButtonItemStyle.Bordered, null), true); NavigationPopoverContentViewController = new UINavigationController (rootDialog); }
public DialogViewControllerDemoListViewCustomCell () : base (UITableViewStyle.Plain, null) { ElementDerivedCustom edc1 = new ElementDerivedCustom(); ElementDerivedCustom edc2 = new ElementDerivedCustom("UITableViewCellCustomHuzDaBoss"); ElementDerivedCustom edc3 = new ElementDerivedCustom("UITableViewCellCustomForList"); Root = new RootElement ("MTD") { 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") { new ElementDerivedCustom() , edc1 , new ElementDerivedCustom() , edc2 , edc3 , new ElementDerivedCustom("UITableViewCellCustomForList") , new ElementDerivedCustom("UITableViewCellCustomHuzDaBoss") }, }; }
public void RenderIssue() { if (ViewModel.Issue == null) return; var avatar = new Avatar(ViewModel.Issue.ReportedBy?.Avatar); NavigationItem.RightBarButtonItem.Enabled = true; HeaderView.Text = ViewModel.Issue.Title; HeaderView.SetImage(avatar.ToUrl(), Images.Avatar); HeaderView.SubText = ViewModel.Issue.Content ?? "Updated " + ViewModel.Issue.UtcLastUpdated.Humanize(); RefreshHeaderView(); var split = new SplitButtonElement(); split.AddButton("Comments", ViewModel.Comments.Items.Count.ToString()); split.AddButton("Watches", ViewModel.Issue.FollowerCount.ToString()); var root = new RootElement(Title); root.Add(new Section { split }); var secDetails = new Section(); if (!string.IsNullOrEmpty(ViewModel.Issue.Content)) { _descriptionElement.LoadContent(new MarkdownRazorView { Model = ViewModel.Issue.Content }.GenerateString()); secDetails.Add(_descriptionElement); } _split1.Button1.Text = ViewModel.Issue.Status; _split1.Button2.Text = ViewModel.Issue.Priority; secDetails.Add(_split1); _split2.Button1.Text = ViewModel.Issue.Metadata.Kind; _split2.Button2.Text = ViewModel.Issue.Metadata.Component ?? "No Component"; secDetails.Add(_split2); _split3.Button1.Text = ViewModel.Issue.Metadata.Version ?? "No Version"; _split3.Button2.Text = ViewModel.Issue.Metadata.Milestone ?? "No Milestone"; secDetails.Add(_split3); var assigneeElement = new StyledStringElement("Assigned", ViewModel.Issue.Responsible != null ? ViewModel.Issue.Responsible.Username : "******", UITableViewCellStyle.Value1) { Image = AtlassianIcon.User.ToImage(), Accessory = UITableViewCellAccessory.DisclosureIndicator }; assigneeElement.Tapped += () => ViewModel.GoToAssigneeCommand.Execute(null); secDetails.Add(assigneeElement); root.Add(secDetails); if (ViewModel.Comments.Any(x => !string.IsNullOrEmpty(x.Content))) { root.Add(new Section { _commentsElement }); } var addComment = new StyledStringElement("Add Comment") { Image = AtlassianIcon.Addcomment.ToImage() }; addComment.Tapped += AddCommentTapped; root.Add(new Section { addComment }); Root = root; }
public IndexedViewController (RootElement root, bool pushing) : base (root, pushing) { // Indexed tables require this style. Style = UITableViewStyle.Plain; EnableSearch = true; SearchPlaceholder = "Find item"; AutoHideSearch = true; }
public SessionsView() : base(UITableViewStyle.Plain) { Root = new RootElement("Schedule"); Root.UnevenRows = true; RefreshRequested += (s, e) => ViewModel.RefreshDataCommand.Execute(null); }
public OverviewView() : base(UITableViewStyle.Plain) { Root = new RootElement("NYC Code Camp"); Root.UnevenRows = true; RefreshRequested += (s, e) => ViewModel.RefreshDataCommand.Execute(null); }
UIViewController StyleTransactionsScreen (RootElement arg) { var dvc = new DialogViewController (UITableViewStyle.Plain, arg,true); dvc.LoadView (); dvc.Root.TableView.SeparatorColor = UIColor.FromPatternImage (Resources.CellSeparator); dvc.Root.TableView.BackgroundView = new UIImageView (UIImage.FromBundle ("paper.png")); return dvc; }
public override void ViewDidLoad() { base.ViewDidLoad(); var bindings = this.CreateInlineBindingTarget<FirstViewModel>(); // note that this list isn't bound - if the view model list changes, then the UI won't update it;s list var radioChoices = from r in (ViewModel as FirstViewModel).DessertChoices select (Element)new RadioElement(r); Root = new RootElement("Example Root") { new Section("Your details") { new EntryElement("Login", "Enter Login name").Bind(bindings, vm => vm.TextProperty), new EntryElement("Password", "Enter Password", "", true).Bind(bindings, vm => vm.PasswordProperty) }, new Section("Your options") { new BooleanElement("Remember me?", false).Bind(bindings, vm => vm.SwitchThis), new CheckboxElement("Upgrade?").Bind(bindings, vm => vm.CheckThis), }, new Section("Radio") { new RootElement("Dessert", new RadioGroup("Dessert", 0)) { new Section() { radioChoices } }.Bind(bindings, e => e.RadioSelected, vm => vm.CurrentDessertIndex) as Element }, new Section("Action") { new StyledStringElement("Second") { BackgroundColor = UIColor.Red, TextColor = UIColor.Yellow, Alignment = UITextAlignment.Right }.Bind(bindings, element => element.SelectedCommand, vm => vm.GoSecondCommand), new StyledStringElement("Bindable Elements") { BackgroundColor = UIColor.Blue, TextColor = UIColor.White, Alignment = UITextAlignment.Center }.Bind(bindings, element => element.SelectedCommand, vm => vm.BindableElementsCommand), }, new Section("Debug out:") { new StringElement("Login is:").Bind(bindings, vm => vm.TextProperty), new StringElement("Password is:").Bind(bindings, vm => vm.PasswordProperty), new StringElement("Remember is:").Bind(bindings, vm => vm.SwitchThis), new StringElement("Upgrade is:").Bind(bindings, vm => vm.CheckThis), new StringElement("Selected Dessert Index is:").Bind(bindings, vm => vm.CurrentDessertIndex), }, }; }
private void Initialize() { Root = new RootElement("Events") { new Section("Normal Events") { new Element("Log Single Event").Bind(this, "SelectedCommand LogNormalEventCommand"), new Element("Log Parametrized Event").Bind(this, "SelectedCommand LogParametrizedEventCommand"), }, new Section("Timed Events") { new Element("Log Single Event").Bind(this, "SelectedCommand LogNormalTimedEventCommand"), new Element("Log Parametrized Timed Event").Bind(this, "SelectedCommand LogParametrizedTimedEventCommand"), new Element("Log Updated Parametrized Timed Event").Bind(this, "SelectedCommand LogParametrizedTimedEventWithEndParametersCommand"), }, new Section("Errors") { new Element("Log Error").Bind(this, "SelectedCommand LogErrorCommand") }, }; // show a progress box if there is some work var events = ViewModel as EventsViewModel; if (events != null) { UIAlertView progress = null; events.PropertyChanged += (sender, e) => { if (e.PropertyName == "IsWorking") { if (events.IsWorking) { if (progress == null) { progress = new UIAlertView("Working...", "Doing absolutely nothing in the background...", null, null, null); UIActivityIndicatorView indicator = new UIActivityIndicatorView(UIActivityIndicatorViewStyle.Gray); indicator.StartAnimating(); progress.SetValueForKey(indicator, (NSString)"accessoryView"); progress.Show(); } } else { if (progress != null) { progress.DismissWithClickedButtonIndex(0, true); progress = null; } } } }; } }
public override void OnViewCreated(Views.View p0, OS.Bundle p1) { if (DialogAdapter == null) { ListAdapter = DialogAdapter = new DialogAdapter(Activity, _root, ListView); _root = null; } DialogAdapter.List = ListView; DialogAdapter.RegisterListView(); base.OnViewCreated(p0, p1); }
public BindingContext(Context context, object callbacks, object o, string title) { _context = context; if (o == null) throw new ArgumentNullException("o"); mappings = new Dictionary<Element, MemberAndInstance>(); Root = new RootElement(title); Populate(callbacks, o, Root); }
public override void ViewDidLoad() { base.ViewDidLoad(); var frame = View.Frame; frame.Width = 200; View.Frame = frame; TableView.ScrollEnabled = false; var binder = this.CreateBindingSet<MenuView, MenuViewModel>(); Func<string, string, Expression<Func<MenuViewModel, object>>, StyledStringElement> createElement = (text, imageFileName, property) => { var element = new StyledStringElement(text) { Accessory = UITableViewCellAccessory.DisclosureIndicator, ShouldDeselectAfterTouch = true, Image = UIImage.FromFile(imageFileName), BackgroundColor = AppStyles.MenuCellBackgroundColor }; binder.Bind(element) .For(el => el.SelectedCommand) .To(property); return element; }; Root = new RootElement("") { new Section { createElement("Overview", "home.png", vm => vm.ShowOverviewCommand), createElement("Full Schedule", "clock.png", vm => vm.ShowSessionsCommand), createElement("Speakers", "users.png", vm => vm.ShowSpeakersCommand), createElement("Sponsors", "sponsors.png", vm => vm.ShowSponsorsCommand), createElement("Facility Map", "map.png", vm => vm.ShowMapCommand) } }; var headerView = new UIView(new RectangleF(0, 0, View.Frame.Width, 60)); headerView.Add(new UILabel(new RectangleF(15, 0, headerView.Frame.Width - 15, headerView.Frame.Height)) { Text = "NYC Code Camp 8", Font = UIFont.FromName("HelveticaNeue-Bold", 18), BackgroundColor = UIColor.Clear, TextColor = AppStyles.StandardTextColor }); TableView.TableHeaderView = headerView; binder.Apply(); }
public override void ViewWillAppear(bool animated) { base.ViewWillAppear(animated); var root = new RootElement(Title); var accountSection = new Section(); var accounts = PopulateAccounts(); accountSection.AddAll(accounts); root.Add(accountSection); Root = root; CheckEntries(); }
private RootElement BuildRoot(string url) { var root = new RootElement (String.Empty); var section = new Section("TodoItems"); root.Add (section); var result = GetAzureResult (url); foreach (JsonObject item in result) { section.Add (new StringElement(item["text"])); } return root; }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); var bindings = this.CreateInlineBindingTarget<LinearViewModel>(); // note that this list isn't bound - if the view model list changes, then the UI won't update it;s list var radioChoices = from r in (ViewModel as LinearViewModel).DessertChoices select (Element)new RadioElement(r); Root = new RootElement("Example Root") { new Section("Your details") { new EntryElement("Login", "Enter Login name").Bind(bindings, vm => vm.TextProperty), new EntryElement("Password", "Enter Password") { Password = true }.Bind(bindings, vm => vm.PasswordProperty) }, new Section("Your options") { new BooleanElement("Remember me?").Bind(bindings, vm => vm.SwitchThis), new CheckboxElement("Upgrade?").Bind(bindings, vm => vm.CheckThis), }, new Section("Radio") { new RootElement("Dessert", new RadioGroup("Dessert", 0)) { new Section() { radioChoices } }.Bind(bindings, e => e.RadioSelected, vm => vm.CurrentDessertIndex) as Element }, new Section("Action") { new ButtonElement("Second").Bind(bindings, element => element.SelectedCommand, vm => vm.GoSecondCommand), new ButtonElement("Bindable Elements").Bind(bindings, element => element.SelectedCommand, vm => vm.BindableElementsCommand), new ButtonElement("Listview dialog").Bind(bindings, element => element.SelectedCommand, vm => vm.GoListViewCommand) }, new Section("Debug out:") { new StringElement("Login is:").Bind(bindings, vm => vm.TextProperty), new StringElement("Password is:").Bind(bindings, vm => vm.PasswordProperty), new StringElement("Remember is:").Bind(bindings, vm => vm.SwitchThis), new StringElement("Upgrade is:").Bind(bindings, vm => vm.CheckThis), new StringElement("Selected Dessert Index is:").Bind(bindings, vm => vm.CurrentDessertIndex), }, }; }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); Root = new RootElement("Test Root Elem") { new Section { new StringElement("Label", "Only Element in a Blank Section"), }, new Section("Test Header", "Test Footer") { new ButtonElement("DialogActivity", (o, e) => StartNew()), new StringElement("DialogListView Activity", Resource.Layout.dialog_labelfieldright) { Click = (o, e) => ClickList(), }, new BooleanElement("Push my button", true), new BooleanElement("Push this too", false), new StringElement("Text label", "Click for EntryElement Test") { Click = (o, e) => ClickElementTest(), }, }, new Section("Part II") { new StringElement("This is the String Element", "The Value"), new CheckboxElement("Check this out", true), new EntryElement("Username", string.Empty){ Hint = "Enter Login", }, new EntryElement("Password", string.Empty) { Hint = "Enter Password", Password = true, }, }, new Section("Group", new ViewElement(Android.Resource.Layout.SimpleListItem1) { Populate = view => { view.FindViewById<TextView>(Android.Resource.Id.Text1).Text = "Custom footer view"; }, }) { (Element)new RootElement("Radio Group", new Android.Dialog.RadioGroup("dessert", 2)) { new Section { new RadioElement("Ice Cream Sandwich", "dessert"), new RadioElement("Honeycomb", "dessert"), new RadioElement("Gingerbread", "dessert"), }, }, } }; ValueChanged += root_ValueChanged; }
public void DemoAdvancedEditing () { var root = new RootElement ("Todo list") { new Section() { new StringElement ("1", "Todo item 1"), new StringElement ("2","Todo item 2"), new StringElement ("3","Todo item 3"), new StringElement ("4","Todo item 4"), new StringElement ("5","Todo item 5") } }; var dvc = new AdvancedEditingDialog (root, true); AdvancedConfigEdit (dvc); navigation.PushViewController (dvc, true); }
public void DemoAddRemove () { rnd = new Random (); var section = new Section (null, "Elements are added randomly") { new StringElement ("Add elements", AddElements), new StringElement ("Add, with no animation", AddNoAnimation), new StringElement ("Remove top element", RemoveElements), new StringElement ("Add Section", AddSection), new StringElement ("Remove Section", RemoveSection) }; region = new Section (); demoRoot = new RootElement ("Add/Remove Demo") { section, region }; var dvc = new DialogViewController (demoRoot, true); navigation.PushViewController (dvc, true); }