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;
}
}
}
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 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/Cells/ComplexFastCellSVG.xaml.cs b/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/Cells/ComplexFastCellSVG.xaml.cs
new file mode 100644
index 0000000..c2ba58d
--- /dev/null
+++ b/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/Cells/ComplexFastCellSVG.xaml.cs
@@ -0,0 +1,84 @@
+using System;
+using System.Collections.Generic;
+using Xamarin.Forms;
+using TwinTechsForms.NControl;
+using TwinTechs.Controls;
+using System.Reflection;
+using System.ComponentModel;
+using System.Text;
+using System.Threading.Tasks;
+using System.Linq;
+
+
+namespace TwinTechs.Example.FastCells.Cells
+{
+ public partial class ComplexFastCellSVG : FastCell, INotifyPropertyChanged
+ {
+
+
+
+ protected override void InitializeCell ()
+ {
+
+
+ InitializeComponent ();
+
+
+
+ }
+
+ protected override void SetupCell (bool isRecycled)
+ {
+
+
+ var mediaItem = BindingContext as MediaItem;
+ if (mediaItem != null) {
+ UserThumbnailView.ImageUrl = mediaItem.ImagePath ?? "";
+ ImageView.ImageUrl = mediaItem.ThumbnailImagePath ?? "";
+ NameLabel.Text = mediaItem.Name;
+ DescriptionLabel.Text = mediaItem.Description;
+ UserThumbnailView2.ImageUrl = mediaItem.ThumbnailImagePath ?? "";
+ UserThumbnailView3.ImageUrl = mediaItem.ThumbnailImagePath ?? "";
+ UserThumbnailView4.ImageUrl = mediaItem.ThumbnailImagePath ?? "";
+ UserThumbnailView5.ImageUrl = mediaItem.ThumbnailImagePath ?? "";
+ UserThumbnailView6.ImageUrl = mediaItem.ThumbnailImagePath ?? "";
+ UserThumbnailView7.ImageUrl = mediaItem.ThumbnailImagePath ?? "";
+
+ svgPic1.SvgAssembly = this.SvgAssembly;
+ svgPic1.SvgPath = this.SmilePath;
+
+ svgPic2.SvgAssembly = this.SvgAssembly;
+ svgPic2.SvgPath = this.SunPath;
+
+
+ }
+ }
+
+
+ private Assembly _svgAssembly;
+
+ public Assembly SvgAssembly {
+ get {
+ if (_svgAssembly == null) {
+ _svgAssembly = typeof (App).GetTypeInfo ().Assembly;
+ }
+ return _svgAssembly;
+ }
+ }
+
+ public string SmilePath {
+ get { return @"TwinTechs.TwinTechs.Example.SvgImageSample.Assets.Smile.svg"; }
+ }
+
+ public string SunPath {
+ get { return @"TwinTechs.TwinTechs.Example.SvgImageSample.Assets.SunAtNight.svg"; }
+ }
+
+
+
+
+
+
+ }
+}
+
diff --git a/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/FastCellComplexSVGSamplePage.xaml b/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/FastCellComplexSVGSamplePage.xaml
new file mode 100644
index 0000000..b0ad74d
--- /dev/null
+++ b/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/FastCellComplexSVGSamplePage.xaml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/FastCellComplexSVGSamplePage.xaml.cs b/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/FastCellComplexSVGSamplePage.xaml.cs
new file mode 100644
index 0000000..5a6dd50
--- /dev/null
+++ b/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/FastCells/FastCellComplexSVGSamplePage.xaml.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+
+using Xamarin.Forms;
+using TwinTechs.Controls;
+
+namespace TwinTechs.Example.FastCells
+{
+ public partial class FastCellComplexSVGSamplePage : ContentPage
+ {
+ public FastCellComplexSVGSamplePage ()
+ {
+ InitializeComponent ();
+ MediaItemsListView.ItemsSource = DataProvider.GetMediaItems ();
+ }
+
+
+ void OnItemSelected (object sender, SelectedItemChangedEventArgs e)
+ {
+ var item = e.SelectedItem as MediaItem;
+ DisplayAlert ("you selected an item", item.Name, "Ok");
+ }
+
+ protected override void OnDisappearing ()
+ {
+ base.OnDisappearing ();
+ AppHelper.FastCellCache.FlushAllCaches ();
+ }
+ }
+}
+
diff --git a/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/SampleMenu.xaml b/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/SampleMenu.xaml
index c3581b2..59d3df3 100644
--- a/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/SampleMenu.xaml
+++ b/TwinTechsForms/TwinTechsFormsExample/TwinTechs/Example/SampleMenu.xaml
@@ -61,6 +61,11 @@
Detail="Using a FastCell with complex xaml"
Tapped="OnFastComplexCell" />
+
+
-
+
Debug
AnyCPU
@@ -165,6 +164,8 @@
+
+
@@ -308,6 +309,8 @@
+
+