void CreateImages(string searchTerm) { ImageStore.ClearCache(); int i = 1; RootElement root = new RootElement(searchTerm + " Results"); SpiffyViewDemo svd; if (!string.IsNullOrEmpty(searchTerm)) { foreach (string result in SearchImages(searchTerm, 1, 100, false)) { long imageId = i; string imageUrl = result; UIFont fTest = new UIFont(); UrlImageStringElement element = new UrlImageStringElement(result, i, result); element.Tapped += delegate { svd = new SpiffyViewDemo(navigation); svd.Show(imageId, imageUrl); }; root.Add(new Section { element }); i++; } } DialogViewController dvc = new DialogViewController(root, true) { Autorotate = true }; navigation.PushViewController(dvc, true); }
void CreateImages (string searchTerm) { ImageLoader.Purge(); int i = 1; RootElement root = new RootElement (searchTerm + " Results"); SpiffyViewDemo svd; if(!string.IsNullOrEmpty(searchTerm)) { foreach (string result in SearchImages (searchTerm, 1, 100, false)) { Uri imageUrl = new Uri(result); UrlImageStringElement element = new UrlImageStringElement (result, imageUrl); element.Tapped += delegate { svd = new SpiffyViewDemo(navigation); svd.Show(imageUrl); }; root.Add (new Section { element }); i++; } } DialogViewController dvc = new DialogViewController (root,true) { Autorotate = true }; navigation.PushViewController (dvc, true); }