From 11ff51d9197e05f6cf37ae608c5a15a0eeeccd0b Mon Sep 17 00:00:00 2001 From: Emanuele Sabetta Date: Sun, 31 Jul 2016 21:49:14 +0200 Subject: [PATCH 1/2] Added random image provider URL for templates ( from https://unsplash.it/ ) to avoid blurred images and to make easier seeing layout bugs. --- .../TwinTechs/Example/DataProvider.cs | 94 ++----------------- 1 file changed, 10 insertions(+), 84 deletions(-) diff --git a/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/DataProvider.cs b/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/DataProvider.cs index faa816d..a4989ee 100644 --- a/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/DataProvider.cs +++ b/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/DataProvider.cs @@ -7,94 +7,20 @@ namespace TwinTechs.Example { public static class DataProvider { - /// - /// Gets the media items. - some canned data - /// - /// The media items. - public static ObservableCollection GetMediaItems () - { - var imagePaths = new String[] { - "http://www.infragistics.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/brent_5F00_schooley.metablogapi/6521.evolve_2D00_th_5F00_2FC8A2E4.jpg", - "https://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=&url=http%3A%2F%2Fwww.hanselman.com%2Fblog%2FXamarinEvolve2013TalkVideoHowCSavedMyMarriage.aspx&ei=uu5IVcrSLsmrgwTNvIHQAg&bvm=bv.92291466,d.eXY&psig=AFQjCNFXgQ4M3FZzJn3mlB3UeqqmUsqYZw&ust=1430929467200256", - "http://www.infragistics.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/nick-landry.metablogapi/5545.XamarinEvolveBannerNick_5F00_26AE7CBA.png", - "http://blog.xamarin.com/wp-content/uploads/2013/05/xamarin-stage.jpg", - "http://blog.xamarin.com/wp-content/uploads/2012/11/Austin-Conv-Center1-300x232.jpg", - "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcR9Bf0UonMZGYjDzrUAuFlYLp0nFSiyyCtN_tSnX_ly4MsDv-qm", - "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcQ4YlPrkvqRk4SzwOlKqazpKHfQTsjX8LPNc68KdKKOxOe1gTZ6", - "http://i.ytimg.com/vi/SKEdFsLKH-U/maxresdefault.jpg", - "http://i.ytimg.com/vi/v9vEhwomUEY/maxresdefault.jpg", - "http://i.ytimg.com/vi/rBKxG67gAqE/maxresdefault.jpg", - "http://blog.xamarin.com/wp-content/uploads/2013/02/josh-speaks-300x200.jpg", - "http://i.ytimg.com/vi/GK9h71vGkpQ/maxresdefault.jpg", - "http://www.mirskayamusicstudio.com/images/2007SrRecital.jpg", - "http://i.ytimg.com/vi/aVmeb7im6M0/maxresdefault.jpg", - }; + /// 
 /// Gets the media items. - some canned data
 /// 
 /// The media items.
 public static ObservableCollection GetMediaItems ()
 { + // Random images as placeholders from https://unsplash.it + // URL Syntax: + // https://unsplash.it///?random + // Example: + // https://unsplash.it/200/300/?random + // You also need to add an additional random number to the URL to avoid the browser cache returning always the same image: + // https://unsplash.it/1920/1280/?random&num= - var thumbnailPaths = new String[] { - "https://www.cambridgenetwork.co.uk/public/news/thumbnail_59902__suffolk-tap.png", - "http://datateca.unad.edu.co/contenidos/551059/OVAS/lecc4-scorm/story_content/thumbnail.jpg", - "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcTbXpym6R2tgnAeKC1soKmEfHP4R5UFK9k9mixksHFT_n2uwlfBnA", - "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSBuOuHm62yob2nL8DIWwWeOrI7kmnFuURCtLY0H53Z9Uca9bME", - "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTTRtBIFU25jPkjSbYPOd244ft99WC2-_mrH3FbkRgnZM6rpdDD", - "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcSXtrv2J733DzB779jniZEtncYJ5zyU-ovyapTOrxRRQKHWWlXw5Q", - "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcQQ1Tgn4cRdvvxmyblIJt9_kqb2Vuzr7v51l0u0I7L7Ef4OsbIUcQ", - "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcT3Di56JKw-IvOKFLJqgkVo9g4LeZrA2ZZFGq5t1-QR_5T45kNC", - "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcQFm2AtW1KzyWPpa2iGeopWpGPGN0LeevSJanO9SJO0bRyTYuIs", - "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcRgvmWx5KtJQBCyW5kTfE3SO6Q3_ML1reqCPcV3qjLcV8Yz_eHmXA", - "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcT_giyE73DP5fX2FxnluI1B6f9ljmFMTSIMMxeTEV0S0429z5yH", - "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRPdi-AFq6Aln92RhhyNmZCoECy2p_FFEP2aGhhQd2AFWjLhhH6", - "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ032CaSsv6sbufx_7FO8Mr-rWPTOXcVzmyhudLh7i09MRLwVMY1w", - "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcTSKDEx6X-Dq90nSFZS7FBE3OplihNPU8L38h5yMde815uVUVwHTg", - }; - var imageNames = new String[] { - "xaml is fast!", - "an interesting name", - "somethign I thought about", - "too quick for me", - "that's really nice", - "slow down!", - "move too fast", - "got to make", - "the moment last", - "kicking around", - "the cobbled stone", - "looking for fun", - "and feeling", - "groovy" - }; - var userNames = new String[] { - "bob", - "shirly", - "ethel", - "jack", - "virginia", - "erik", - "rusty", - "mickey", - "Falcon", - "Henry", - "Lazarus", - "Jackie", - "Ashley", - "Penelope", - "Heather" - }; + Random rand = new Random ();

 var imagePaths = new String [] {
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 };




 var thumbnailPaths = new String [] {
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 "https://unsplash.it/1920/1280/?random&num=" + rand.Next(),
 };





 var imageNames = new String [] {
 "xaml is fast!",
 "an interesting name",
 "somethign I thought about",
 "too quick for me",
 "that's really nice",
 "slow down!",
 "move too fast",
 "got to make",
 "the moment last",
 "kicking around",
 "the cobbled stone",
 "looking for fun",
 "and feeling",
 "groovy"
 };


 var userNames = new String [] {
 "bob",
 "shirly",
 "ethel",
 "jack",
 "virginia",
 "erik",
 "rusty",
 "mickey",
 "Falcon",
 "Henry",
 "Lazarus",
 "Jackie",
 "Ashley",
 "Penelope",
 "Heather"
 };

 ObservableCollection items = new ObservableCollection ();

 int counter = 0;
 for (int index = 0; index < 20; index++) {
 for (int i = 0; i < imagePaths.Length; i++) {
 var item = new MediaItem (imageNames [i], imageNames [i], userNames [i], imagePaths [i], imagePaths [i], thumbnailPaths [i], counter);
 items.Add (item);
 counter++;
 } - ObservableCollection items = new ObservableCollection (); - - int counter = 0; - for (int index = 0; index < 20; index++) { - for (int i = 0; i < imagePaths.Length; i++) { - var item = new MediaItem (imageNames [i], imageNames [i], userNames [i], imagePaths [i], imagePaths [i], thumbnailPaths [i], counter); - items.Add (item); - counter++; - } - - } - return items; - } + }
 return items;
 } } } From b62dbbeb8ddae68082af6f139f1bfac1d968a77e Mon Sep 17 00:00:00 2001 From: Emanuele Sabetta Date: Wed, 3 Aug 2016 10:16:55 +0200 Subject: [PATCH 2/2] Added a new menu entry ("FastCellComplexSVG") to test FastCell performances when SVG icons are used. --- .../FastCells/Cells/ComplexFastCellSVG.xaml | 165 ++++++++++++++++++ .../Cells/ComplexFastCellSVG.xaml.cs | 84 +++++++++ .../FastCellComplexSVGSamplePage.xaml | 33 ++++ .../FastCellComplexSVGSamplePage.xaml.cs | 31 ++++ .../TwinTechs/Example/SampleMenu.xaml | 5 + .../TwinTechs/Example/SampleMenu.xaml.cs | 8 + .../TwinTechsFormsExample.csproj | 7 +- 7 files changed, 331 insertions(+), 2 deletions(-) create mode 100644 TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/Cells/ComplexFastCellSVG.xaml create mode 100644 TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/Cells/ComplexFastCellSVG.xaml.cs create mode 100644 TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/FastCellComplexSVGSamplePage.xaml create mode 100644 TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/FastCellComplexSVGSamplePage.xaml.cs diff --git a/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/Cells/ComplexFastCellSVG.xaml b/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/Cells/ComplexFastCellSVG.xaml new file mode 100644 index 0000000..d0c375e --- /dev/null +++ b/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/Cells/ComplexFastCellSVG.xaml @@ -0,0 +1,165 @@ + + + + + + + + + + +