diff --git a/CarouselViewChallenge/CarouselViewChallenge.Android/CarouselViewChallenge.Android.csproj b/CarouselViewChallenge/CarouselViewChallenge.Android/CarouselViewChallenge.Android.csproj
index 1e33499..10d39f2 100644
--- a/CarouselViewChallenge/CarouselViewChallenge.Android/CarouselViewChallenge.Android.csproj
+++ b/CarouselViewChallenge/CarouselViewChallenge.Android/CarouselViewChallenge.Android.csproj
@@ -54,8 +54,11 @@
-
-
+
+
+
+ 1.2.1
+
@@ -101,4 +104,4 @@
-
+
\ No newline at end of file
diff --git a/CarouselViewChallenge/CarouselViewChallenge.UWP/CarouselViewChallenge.UWP.csproj b/CarouselViewChallenge/CarouselViewChallenge.UWP/CarouselViewChallenge.UWP.csproj
index 4b6b2c9..7474a6f 100644
--- a/CarouselViewChallenge/CarouselViewChallenge.UWP/CarouselViewChallenge.UWP.csproj
+++ b/CarouselViewChallenge/CarouselViewChallenge.UWP/CarouselViewChallenge.UWP.csproj
@@ -11,7 +11,7 @@
CarouselViewChallenge.UWP
en-US
UAP
- 10.0.17763.0
+ 10.0.18362.0
10.0.16299.0
14
true
@@ -146,8 +146,11 @@
-
-
+
+
+
+ 1.2.1
+
@@ -159,4 +162,4 @@
14.0
-
+
\ No newline at end of file
diff --git a/CarouselViewChallenge/CarouselViewChallenge.iOS/CarouselViewChallenge.iOS.csproj b/CarouselViewChallenge/CarouselViewChallenge.iOS/CarouselViewChallenge.iOS.csproj
index 6241d2c..eccff31 100644
--- a/CarouselViewChallenge/CarouselViewChallenge.iOS/CarouselViewChallenge.iOS.csproj
+++ b/CarouselViewChallenge/CarouselViewChallenge.iOS/CarouselViewChallenge.iOS.csproj
@@ -130,7 +130,10 @@
-
+
+
+ 1.2.1
+
@@ -139,4 +142,4 @@
CarouselViewChallenge
-
+
\ No newline at end of file
diff --git a/CarouselViewChallenge/CarouselViewChallenge/CarouselViewChallenge.csproj b/CarouselViewChallenge/CarouselViewChallenge/CarouselViewChallenge.csproj
index a58ec88..b89eb14 100644
--- a/CarouselViewChallenge/CarouselViewChallenge/CarouselViewChallenge.csproj
+++ b/CarouselViewChallenge/CarouselViewChallenge/CarouselViewChallenge.csproj
@@ -7,11 +7,8 @@
-
-
-
-
-
+
+
diff --git a/CarouselViewChallenge/CarouselViewChallenge/Models/CarouselItem.cs b/CarouselViewChallenge/CarouselViewChallenge/Models/CarouselItem.cs
new file mode 100644
index 0000000..f5184a7
--- /dev/null
+++ b/CarouselViewChallenge/CarouselViewChallenge/Models/CarouselItem.cs
@@ -0,0 +1,90 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+using System.Text;
+
+namespace CarouselViewChallenge.Models
+{
+ public class CarouselItem : Game, INotifyPropertyChanged
+ {
+ private double _position;
+ private double _rotation;
+ private double _scale;
+ private double _width;
+ private double _height;
+ private double _margin;
+
+ public CarouselItem()
+ {
+ Scale = 1;
+ Height = 450;
+ Margin = 15;
+
+ }
+
+ public double Position
+ {
+ get { return _position; }
+ set
+ {
+ _position = value;
+ OnPropertyChanged();
+ }
+ }
+
+ public double Rotation
+ {
+ get { return _rotation; }
+ set
+ {
+ _rotation = value;
+ OnPropertyChanged();
+ }
+ }
+
+ public double Scale
+ {
+ get { return _scale; }
+ set
+ {
+ _scale = value;
+ OnPropertyChanged();
+ }
+ }
+ public double Height
+ {
+ get { return _height; }
+ set
+ {
+ _height = value;
+ OnPropertyChanged();
+ }
+ }
+ public double Width
+ {
+ get { return _width; }
+ set
+ {
+ _width = value;
+ OnPropertyChanged();
+ }
+ }
+ public double Margin
+ {
+ get { return _margin; }
+ set
+ {
+ _margin = value;
+ OnPropertyChanged();
+ }
+ }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = "")
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+}
diff --git a/CarouselViewChallenge/CarouselViewChallenge/Models/Game.cs b/CarouselViewChallenge/CarouselViewChallenge/Models/Game.cs
new file mode 100644
index 0000000..557b134
--- /dev/null
+++ b/CarouselViewChallenge/CarouselViewChallenge/Models/Game.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CarouselViewChallenge.Models
+{
+ public class Game
+ {
+ public string Id { get; set; }
+ public string Name { get; set; }
+ public string Img { get; set; }
+ public string Platform { get; set; }
+ public string Key { get; set; }
+ public string State { get; set; }
+ //public Visibility ShowKey { get; set; }
+ public bool BtnState { get; set; }
+ public string Price { get; set; }
+ public string Genre { get; set; }
+ //public Brush StateColor { get; set; }
+ }
+}
diff --git a/CarouselViewChallenge/CarouselViewChallenge/ViewModels/BaseViewModel.cs b/CarouselViewChallenge/CarouselViewChallenge/ViewModels/BaseViewModel.cs
new file mode 100644
index 0000000..dd0cdc2
--- /dev/null
+++ b/CarouselViewChallenge/CarouselViewChallenge/ViewModels/BaseViewModel.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+using System.Text;
+
+namespace CarouselViewChallenge.ViewModels
+{
+ public abstract class BaseViewModel : INotifyPropertyChanged
+ {
+ protected BaseViewModel()
+ {
+
+ }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
+ {
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+}
diff --git a/CarouselViewChallenge/CarouselViewChallenge/ViewModels/ListGamesViewModel.cs b/CarouselViewChallenge/CarouselViewChallenge/ViewModels/ListGamesViewModel.cs
new file mode 100644
index 0000000..85bfb97
--- /dev/null
+++ b/CarouselViewChallenge/CarouselViewChallenge/ViewModels/ListGamesViewModel.cs
@@ -0,0 +1,72 @@
+using CarouselViewChallenge.Models;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Text;
+
+namespace CarouselViewChallenge.ViewModels
+{
+ class ListGamesViewModel : BaseViewModel
+ {
+ Game selectedGame;
+ public Game SelectedGame
+ {
+ get { return selectedGame; }
+ set
+ {
+ selectedGame = value;
+ OnPropertyChanged();
+ }
+ }
+ //get a collection of Game Model
+ ObservableCollection games;
+ public ObservableCollection Games
+ {
+ get { return games; }
+ set
+ {
+ games = value;
+ OnPropertyChanged();
+ }
+ }
+
+ public ListGamesViewModel()
+ {
+ Games = new ObservableCollection();
+
+
+ Games.Add(new CarouselItem
+ {
+ Name = "We Happy Few",
+ Img = @"https://pbs.twimg.com/profile_images/897864241566294017/QCYJPjVX_400x400.jpg",
+ Platform = "Steam",
+ Genre = "Stealth",
+ Price = "18.77€",
+ });
+ Games.Add(new CarouselItem
+ {
+ Name = "Anno 1800",
+ Img = @"https://s3.gaming-cdn.com/images/products/2249/271x377/anno-1800-cover.jpg",
+ Platform = "Uplay",
+ Genre = "Strategy",
+ Price = "41.69€",
+ });
+ Games.Add(new CarouselItem
+ {
+ Name = "Quantum Break",
+ Img = @"https://s1.qwant.com/thumbr/0x380/8/e/33fd35a2e5b3ef2ac390ac1440b0a17d8f4c17a12bdd1b4cdad5eb6bfc1c28/quantum-break-cover.jpg?u=http%3A%2F%2Fgamepreorders.com%2Fwp-content%2Fuploads%2F2016%2F02%2Fquantum-break-cover.jpg&q=0&b=1&p=0&a=1",
+ Platform = "Microsoft store",
+ Genre = "Narrative",
+ Price = "10.51€",
+ });
+ Games.Add(new CarouselItem
+ {
+ Name = "Sherlock Holmes: The Devil's Daughter",
+ Img = @"https://s2.qwant.com/thumbr/0x380/6/f/d59c12435321285615b8193a2eb980646956ef51ba05fbc96df12920e45f76/3003937-xb1_esrb_3d.jpg?u=https%3A%2F%2Fstatic.gamespot.com%2Fuploads%2Fscale_medium%2F1197%2F11970954%2F3003937-xb1_esrb_3d.jpg&q=0&b=1&p=0&a=1",
+ Platform = "Origin",
+ Genre = "Detective",
+ Price = "8.45€",
+ });
+ }
+ }
+}
diff --git a/CarouselViewChallenge/CarouselViewChallenge/Views/CarouselViewChallengePage.xaml b/CarouselViewChallenge/CarouselViewChallenge/Views/CarouselViewChallengePage.xaml
index 1a7cc0d..bdb3a29 100644
--- a/CarouselViewChallenge/CarouselViewChallenge/Views/CarouselViewChallengePage.xaml
+++ b/CarouselViewChallenge/CarouselViewChallenge/Views/CarouselViewChallengePage.xaml
@@ -3,11 +3,140 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:pancakeview="clr-namespace:Xamarin.Forms.PancakeView;assembly=Xamarin.Forms.PancakeView"
+ xmlns:yummy="clr-namespace:Xamarin.Forms.PancakeView;assembly=Xamarin.Forms.PancakeView"
mc:Ignorable="d"
- x:Class="CarouselViewChallenge.Views.CarouselViewChallengePage">
+ x:Class="CarouselViewChallenge.Views.CarouselViewChallengePage"
+ >
+
+
+
+
+ #555555
+ #FFA334
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CarouselViewChallenge/CarouselViewChallenge/Views/CarouselViewChallengePage.xaml.cs b/CarouselViewChallenge/CarouselViewChallenge/Views/CarouselViewChallengePage.xaml.cs
index 38f2e9f..8484350 100644
--- a/CarouselViewChallenge/CarouselViewChallenge/Views/CarouselViewChallengePage.xaml.cs
+++ b/CarouselViewChallenge/CarouselViewChallenge/Views/CarouselViewChallengePage.xaml.cs
@@ -3,8 +3,10 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
-
+using CarouselViewChallenge.Models;
+using CarouselViewChallenge.ViewModels;
using Xamarin.Forms;
+using Xamarin.Forms.PancakeView;
using Xamarin.Forms.Xaml;
namespace CarouselViewChallenge.Views
@@ -15,6 +17,59 @@ public partial class CarouselViewChallengePage : ContentPage
public CarouselViewChallengePage()
{
InitializeComponent();
+
+ // Bind the view with viewmodel
+ BindingContext = new ListGamesViewModel();
+ }
+
+ private void CarouselView_Scrolled(object sender, ItemsViewScrolledEventArgs e)
+ {
+ var carousel = (CarouselView)sender;
+ var carouselItems = carousel.ItemsSource.Cast