summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ImageCellTablePage.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ImageCellTablePage.cs')
-rw-r--r--Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ImageCellTablePage.cs68
1 files changed, 68 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ImageCellTablePage.cs b/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ImageCellTablePage.cs
new file mode 100644
index 00000000..2b941bfd
--- /dev/null
+++ b/Xamarin.Forms.Controls/GalleryPages/CellsGalleries/ImageCellTablePage.cs
@@ -0,0 +1,68 @@
+namespace Xamarin.Forms.Controls
+{
+ public class ImageCellTablePage : ContentPage
+ {
+
+ public ImageCellTablePage ()
+ {
+ Title = "ImageCell Table Gallery - Legacy";
+
+ Device.OnPlatform (iOS: () => {
+ if (Device.Idiom == TargetIdiom.Tablet) {
+ Padding = new Thickness (0, 0, 0, 60);
+ }
+ });
+
+ var tableSection = new TableSection ("Section One") {
+ new ImageCell { Text = "Text 1", ImageSource = new FileImageSource { File = "crimson.jpg" } },
+ new ImageCell { Text = "Text 2", Detail = "Detail 1", ImageSource = new FileImageSource { File = "crimson.jpg" } },
+ new ImageCell { Text = "Text 3", ImageSource = new FileImageSource { File = "cover1.jpg" } },
+ new ImageCell { Text = "Text 4", Detail = "Detail 2", ImageSource = new FileImageSource { File = "cover1.jpg" } },
+ new ImageCell { Text = "Text 5", ImageSource = new FileImageSource { File = "oasis.jpg" } },
+ new ImageCell { Text = "Text 6", Detail = "Detail 3", ImageSource = new FileImageSource { File = "oasis.jpg" } },
+ new ImageCell { Text = "Text 7", ImageSource = new FileImageSource { File = "crimson.jpg" } },
+ new ImageCell { Text = "Text 8", Detail = "Detail 4", ImageSource = new FileImageSource { File = "crimson.jpg" } },
+ new ImageCell { Text = "Text 9", ImageSource = new FileImageSource { File = "cover1.jpg" } },
+ new ImageCell { Text = "Text 10", Detail = "Detail 5", ImageSource = new FileImageSource { File = "cover1.jpg" } },
+ new ImageCell { Text = "Text 11", ImageSource = new FileImageSource { File = "oasis.jpg" } },
+ new ImageCell { Text = "Text 12", Detail = "Detail 6", ImageSource = new FileImageSource { File = "oasis.jpg" } },
+ };
+
+ ImageCell imageCell = null;
+ imageCell = new ImageCell {
+ Text = "not tapped",
+ ImageSource = "oasis.jpg",
+ Command = new Command(()=>{
+ imageCell.Text = "tapped";
+ (imageCell.ImageSource as FileImageSource).File = "crimson.jpg";
+ })
+ };
+ var tableSectionTwo = new TableSection ("Section Two") {
+ new ImageCell { Text = "Text 13", ImageSource = new FileImageSource { File = "crimson.jpg" } },
+ new ImageCell { Text = "Text 14", Detail = "Detail 7", ImageSource = new FileImageSource { File = "crimson.jpg" } },
+ new ImageCell { Text = "Text 15", ImageSource = new FileImageSource { File = "cover1.jpg" } },
+ new ImageCell { Text = "Text 16", Detail = "Detail 8", ImageSource = new FileImageSource { File = "cover1.jpg" } },
+ new ImageCell { Text = "Text 17", ImageSource = new FileImageSource { File = "oasis.jpg" } },
+ new ImageCell { Text = "Text 18", Detail = "Detail 9", ImageSource = new FileImageSource { File = "oasis.jpg" } },
+ new ImageCell { Text = "Text 19", ImageSource = new FileImageSource { File = "crimson.jpg" } },
+ new ImageCell { Text = "Text 20", Detail = "Detail 10", ImageSource = new FileImageSource { File = "crimson.jpg" } },
+ new ImageCell { Text = "Text 21", ImageSource = new FileImageSource { File = "cover1.jpg" } },
+ new ImageCell { Text = "Text 22", Detail = "Detail 11", ImageSource = new FileImageSource { File = "cover1.jpg" } },
+ new ImageCell { Text = "Text 23", ImageSource = new FileImageSource { File = "oasis.jpg" } },
+ new ImageCell { Text = "Text 24", Detail = "Detail 12", ImageSource = new FileImageSource { File = "oasis.jpg" } },
+ imageCell,
+ };
+
+ var root = new TableRoot ("Text Cell table") {
+ tableSection,
+ tableSectionTwo
+ };
+
+ var table = new TableView {
+ Root = root,
+ };
+
+ Content = table;
+ }
+ }
+} \ No newline at end of file