diff --git a/.idea/.idea.VisualChallenge/.idea/contentModel.xml b/.idea/.idea.VisualChallenge/.idea/contentModel.xml
new file mode 100644
index 0000000..d09f7f7
--- /dev/null
+++ b/.idea/.idea.VisualChallenge/.idea/contentModel.xml
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.VisualChallenge/.idea/encodings.xml b/.idea/.idea.VisualChallenge/.idea/encodings.xml
new file mode 100644
index 0000000..15a15b2
--- /dev/null
+++ b/.idea/.idea.VisualChallenge/.idea/encodings.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.VisualChallenge/.idea/indexLayout.xml b/.idea/.idea.VisualChallenge/.idea/indexLayout.xml
new file mode 100644
index 0000000..27ba142
--- /dev/null
+++ b/.idea/.idea.VisualChallenge/.idea/indexLayout.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.VisualChallenge/.idea/misc.xml b/.idea/.idea.VisualChallenge/.idea/misc.xml
new file mode 100644
index 0000000..1d8c84d
--- /dev/null
+++ b/.idea/.idea.VisualChallenge/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.VisualChallenge/.idea/modules.xml b/.idea/.idea.VisualChallenge/.idea/modules.xml
new file mode 100644
index 0000000..04307d9
--- /dev/null
+++ b/.idea/.idea.VisualChallenge/.idea/modules.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.VisualChallenge/.idea/vcs.xml b/.idea/.idea.VisualChallenge/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/.idea.VisualChallenge/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.VisualChallenge/.idea/workspace.xml b/.idea/.idea.VisualChallenge/.idea/workspace.xml
new file mode 100644
index 0000000..ae4e642
--- /dev/null
+++ b/.idea/.idea.VisualChallenge/.idea/workspace.xml
@@ -0,0 +1,464 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1553726090387
+
+
+ 1553726090387
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.VisualChallenge/VisualChallenge.Android.iml b/.idea/.idea.VisualChallenge/VisualChallenge.Android.iml
new file mode 100644
index 0000000..f549863
--- /dev/null
+++ b/.idea/.idea.VisualChallenge/VisualChallenge.Android.iml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.VisualChallenge/riderModule.iml b/.idea/.idea.VisualChallenge/riderModule.iml
new file mode 100644
index 0000000..bd73388
--- /dev/null
+++ b/.idea/.idea.VisualChallenge/riderModule.iml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/VisualChallenge/VisualChallenge.Android/MainActivity.cs b/VisualChallenge/VisualChallenge.Android/MainActivity.cs
index af10bc6..caa16d3 100644
--- a/VisualChallenge/VisualChallenge.Android/MainActivity.cs
+++ b/VisualChallenge/VisualChallenge.Android/MainActivity.cs
@@ -23,8 +23,9 @@ protected override void OnCreate(Bundle savedInstanceState)
global::Xamarin.Forms.Forms.SetFlags("Shell_Experimental", "CollectionView_Experimental", "FastRenderers_Experimental");
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
- global::Xamarin.Forms.FormsMaterial.Init(this, savedInstanceState);
- LoadApplication(new App());
+ global::Xamarin.Forms.FormsMaterial.Init(this, savedInstanceState);
+ FFImageLoading.Forms.Platform.CachedImageRenderer.Init(true);
+ LoadApplication(new App());
}
}
}
\ No newline at end of file
diff --git a/VisualChallenge/VisualChallenge.Android/VisualChallenge.Android.csproj b/VisualChallenge/VisualChallenge.Android/VisualChallenge.Android.csproj
index 051ffba..6815989 100644
--- a/VisualChallenge/VisualChallenge.Android/VisualChallenge.Android.csproj
+++ b/VisualChallenge/VisualChallenge.Android/VisualChallenge.Android.csproj
@@ -48,6 +48,7 @@
+
4.0.1.206893
diff --git a/VisualChallenge/VisualChallenge.iOS/AppDelegate.cs b/VisualChallenge/VisualChallenge.iOS/AppDelegate.cs
index dfedc27..1429b90 100644
--- a/VisualChallenge/VisualChallenge.iOS/AppDelegate.cs
+++ b/VisualChallenge/VisualChallenge.iOS/AppDelegate.cs
@@ -25,6 +25,9 @@ public override bool FinishedLaunching(UIApplication app, NSDictionary options)
global::Xamarin.Forms.Forms.SetFlags("Shell_Experimental", "Visual_Experimental", "CollectionView_Experimental", "FastRenderers_Experimental");
global::Xamarin.Forms.Forms.Init();
global::Xamarin.Forms.FormsMaterial.Init();
+ FFImageLoading.Forms.Platform.CachedImageRenderer.Init();
+
+
LoadApplication(new App());
return base.FinishedLaunching(app, options);
diff --git a/VisualChallenge/VisualChallenge.iOS/VisualChallenge.iOS.csproj b/VisualChallenge/VisualChallenge.iOS/VisualChallenge.iOS.csproj
index f7d6432..cbbc67d 100644
--- a/VisualChallenge/VisualChallenge.iOS/VisualChallenge.iOS.csproj
+++ b/VisualChallenge/VisualChallenge.iOS/VisualChallenge.iOS.csproj
@@ -132,6 +132,7 @@
+
4.0.1.206893
diff --git a/VisualChallenge/VisualChallenge/App.xaml.cs b/VisualChallenge/VisualChallenge/App.xaml.cs
index 2ab3c58..e1c3e3c 100644
--- a/VisualChallenge/VisualChallenge/App.xaml.cs
+++ b/VisualChallenge/VisualChallenge/App.xaml.cs
@@ -10,6 +10,7 @@ public App()
InitializeComponent();
MainPage = new AppShell();
+
}
protected override void OnStart()
diff --git a/VisualChallenge/VisualChallenge/GradientView.cs b/VisualChallenge/VisualChallenge/GradientView.cs
new file mode 100644
index 0000000..f9cc7aa
--- /dev/null
+++ b/VisualChallenge/VisualChallenge/GradientView.cs
@@ -0,0 +1,47 @@
+using SkiaSharp;
+using SkiaSharp.Views.Forms;
+using Xamarin.Forms;
+
+namespace VisualChallenge
+{
+ public class GradientView : ContentView
+ {
+ public string StartColor { get; set; } = "#ffffff";
+ public string EndColor { get; set; } = "#000000";
+ public bool Horizontal { get; set; } = false;
+
+
+ public GradientView()
+ {
+ SKCanvasView canvasView = new SKCanvasView();
+ canvasView.PaintSurface += OnCanvasViewPaintSurface;
+ Content = canvasView;
+ }
+
+ void OnCanvasViewPaintSurface(object sender, SKPaintSurfaceEventArgs args)
+ {
+ SKImageInfo info = args.Info;
+ SKSurface surface = args.Surface;
+ SKCanvas canvas = surface.Canvas;
+
+ canvas.Clear();
+
+ SKColor.TryParse(StartColor, out var stColor);
+ SKColor.TryParse(EndColor, out var edColor);
+
+ var colors = new SKColor[] { stColor, edColor };
+ SKPoint startPoint = new SKPoint(0, 0);
+ SKPoint endPoint = Horizontal ? new SKPoint(info.Width, 0) : new SKPoint(0, info.Height);
+
+ var shader = SKShader.CreateLinearGradient(startPoint, endPoint, colors, null, SKShaderTileMode.Clamp);
+
+ SKPaint paint = new SKPaint
+ {
+ Style = SKPaintStyle.Fill,
+ Shader = shader
+ };
+
+ canvas.DrawRect(new SKRect(0, 0, info.Width, info.Height), paint);
+ }
+ }
+}
\ No newline at end of file
diff --git a/VisualChallenge/VisualChallenge/VisualChallenge.csproj b/VisualChallenge/VisualChallenge/VisualChallenge.csproj
index 7b3490c..660b678 100644
--- a/VisualChallenge/VisualChallenge/VisualChallenge.csproj
+++ b/VisualChallenge/VisualChallenge/VisualChallenge.csproj
@@ -1,4 +1,4 @@
-
+
netstandard2.0
@@ -11,6 +11,8 @@
+
+
diff --git a/VisualChallenge/VisualChallenge/VisualChallengePage.xaml b/VisualChallenge/VisualChallenge/VisualChallengePage.xaml
index 305cee4..638d69f 100644
--- a/VisualChallenge/VisualChallenge/VisualChallengePage.xaml
+++ b/VisualChallenge/VisualChallenge/VisualChallengePage.xaml
@@ -3,21 +3,53 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
x:Class="VisualChallenge.VisualChallengePage"
- Shell.NavBarIsVisible="True"
+ Shell.NavBarIsVisible="false"
BackgroundColor="White"
- Title="Visual Challenge"
- >
+ class="h1"
+ xmlns:controls="clr-namespace:VisualChallenge"
+ xmlns:ffimageloading="clr-namespace:FFImageLoading.Forms;assembly=FFImageLoading.Forms">
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/VisualChallenge/VisualChallenge/VisualChallengePage.xaml.cs b/VisualChallenge/VisualChallenge/VisualChallengePage.xaml.cs
index 645c5af..444080e 100644
--- a/VisualChallenge/VisualChallenge/VisualChallengePage.xaml.cs
+++ b/VisualChallenge/VisualChallenge/VisualChallengePage.xaml.cs
@@ -1,5 +1,5 @@
using System;
-
+using System.Collections.Generic;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
@@ -7,14 +7,51 @@ namespace VisualChallenge
{
public partial class VisualChallengePage : ContentPage
{
+
+ public List Monkeys;
+
public VisualChallengePage()
{
InitializeComponent();
+
+ Monkeys = new List
+ {
+ new Monkey
+ {
+ Name = "Common Marmoset",
+ Image = "https://www.monkeyworlds.com/wp-content/uploads/common_marmoset.jpg"
+ },
+ new Monkey
+ {
+ Name = "Gibbon",
+ Image = "https://kids.nationalgeographic.com/content/dam/kids/photos/animals/Mammals/A-G/gibbon-tan-18778051.ngsversion.1415994938342.jpg"
+ },
+ new Monkey
+ {
+ Name = "Proboscis",
+ Image = "https://www.neprimateconservancy.org/uploads/1/5/3/8/15380094/editor/borneo-205096-1280-proboscis_98.jpg"
+ },
+ new Monkey
+ {
+ Name = "Pygmy",
+ Image = "https://www.certapet.com/wp-content/uploads/2017/08/pygmy-2.jpg"
+ }
+ };
+
+ MonkeyList.ItemsSource = Monkeys;
}
private void Button_Clicked(object sender, EventArgs e)
{
Device.OpenUri(new Uri("https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/visual"));
}
+
+
+
+ public class Monkey
+ {
+ public string Name { get; set; }
+ public string Image { get; set; }
+ }
}
}
\ No newline at end of file
diff --git a/VisualChallenge/VisualChallenge/core.css b/VisualChallenge/VisualChallenge/core.css
new file mode 100644
index 0000000..6222727
--- /dev/null
+++ b/VisualChallenge/VisualChallenge/core.css
@@ -0,0 +1,4 @@
+^Label {
+ color: white;
+ font-size: 30;
+}