diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 7c313b0..8637a46 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,22 +1,42 @@
## Submission description
-_Use this area to describe your submission. Screenshots are appreciated and GIFs (with a hard "g") or video clips will get bonus points!_
+I wanted to test RightToLeft
### What went well
-_This is self-explanatory. Let us know what you liked about using the CarouselView when creating this submission._
+I was surprised how RightToLeft is supported, When I set FlowDirection="RightToLeft", The first page was as expected,
+Excellent job Xamarin team, Go Ahead
### What didn't go well
-_What didn't go well, and why? How can we improve it? Please provide as much detail as possible!_
-
+with VS2017, the app crashes immediatly, I couldn't fix it.
+with VS2019, when i write as following, i get exception with "cast not valid" message:
+
+
+
+
+ //My template
+
+
+
+
+
+ but no crashed when i write as following:
+
+
+
+ //My template
+
+
+
+
### Missing or desired things
-_Fill this with any missing or desired things and how they impact you._
+Nothing not mentioned by other PRs
### Anything else
-_If we missed anything, feel free to mention it here._
+Very good job, Go Ahead Xamarin
### Take out a survey for some goodies
diff --git a/CarouselViewChallenge/CarouselViewChallenge.Android/CarouselViewChallenge.Android.csproj b/CarouselViewChallenge/CarouselViewChallenge.Android/CarouselViewChallenge.Android.csproj
index 82e6221..18e83ce 100644
--- a/CarouselViewChallenge/CarouselViewChallenge.Android/CarouselViewChallenge.Android.csproj
+++ b/CarouselViewChallenge/CarouselViewChallenge.Android/CarouselViewChallenge.Android.csproj
@@ -53,9 +53,10 @@
+
+ 28.0.0.1
+
-
-
diff --git a/CarouselViewChallenge/CarouselViewChallenge.Android/MainActivity.cs b/CarouselViewChallenge/CarouselViewChallenge.Android/MainActivity.cs
index fd4e22a..e8b0c48 100644
--- a/CarouselViewChallenge/CarouselViewChallenge.Android/MainActivity.cs
+++ b/CarouselViewChallenge/CarouselViewChallenge.Android/MainActivity.cs
@@ -1,10 +1,5 @@
-using System;
-
-using Android.App;
+using Android.App;
using Android.Content.PM;
-using Android.Runtime;
-using Android.Views;
-using Android.Widget;
using Android.OS;
namespace CarouselViewChallenge.Droid
@@ -20,15 +15,8 @@ protected override void OnCreate(Bundle savedInstanceState)
base.OnCreate(savedInstanceState);
global::Xamarin.Forms.Forms.SetFlags("CollectionView_Experimental");
- Xamarin.Essentials.Platform.Init(this, savedInstanceState);
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
LoadApplication(new App());
}
- public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)
- {
- Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
-
- base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
- }
}
}
\ No newline at end of file
diff --git a/CarouselViewChallenge/CarouselViewChallenge.iOS/CarouselViewChallenge.iOS.csproj b/CarouselViewChallenge/CarouselViewChallenge.iOS/CarouselViewChallenge.iOS.csproj
index 155cd56..cee7893 100644
--- a/CarouselViewChallenge/CarouselViewChallenge.iOS/CarouselViewChallenge.iOS.csproj
+++ b/CarouselViewChallenge/CarouselViewChallenge.iOS/CarouselViewChallenge.iOS.csproj
@@ -130,7 +130,6 @@
-
diff --git a/CarouselViewChallenge/CarouselViewChallenge/CarouselViewChallenge.csproj b/CarouselViewChallenge/CarouselViewChallenge/CarouselViewChallenge.csproj
index 198ec7f..43b0d0e 100644
--- a/CarouselViewChallenge/CarouselViewChallenge/CarouselViewChallenge.csproj
+++ b/CarouselViewChallenge/CarouselViewChallenge/CarouselViewChallenge.csproj
@@ -6,12 +6,7 @@
-
-
-
-
-
-
+
diff --git a/CarouselViewChallenge/CarouselViewChallenge/Models/Article.cs b/CarouselViewChallenge/CarouselViewChallenge/Models/Article.cs
new file mode 100644
index 0000000..7d3f170
--- /dev/null
+++ b/CarouselViewChallenge/CarouselViewChallenge/Models/Article.cs
@@ -0,0 +1,80 @@
+using System.ComponentModel;
+
+namespace CarouselViewChallenge.Models
+{
+ public class Article : INotifyPropertyChanged
+ {
+ #region Properties
+ private string title;
+ public string Article_title
+ {
+ get
+ {
+ return title;
+ }
+
+ set
+ {
+ title = value;
+ onPropertyChange("Article_title");
+ }
+ }
+
+ private string imageurl;
+ public string Image
+ {
+ get
+ {
+ return imageurl;
+ }
+ set
+ {
+ imageurl = value;
+ onPropertyChange("Image");
+ }
+ }
+
+ private string category;
+ public string Category
+ {
+ get
+ {
+ return category;
+ }
+ set
+ {
+ category = value;
+ onPropertyChange("Category");
+ }
+ }
+
+ private string content;
+ public string Content
+ {
+ get
+ {
+ return content;
+ }
+ set
+ {
+ content = value;
+ onPropertyChange("Content");
+ }
+ }
+ #endregion
+
+ public Article()
+ {
+ }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ private void onPropertyChange(string propertyName)
+ {
+ if (PropertyChanged != null)
+ {
+ PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+ }
+}
diff --git a/CarouselViewChallenge/CarouselViewChallenge/ViewModels/ArticleViewModel.cs b/CarouselViewChallenge/CarouselViewChallenge/ViewModels/ArticleViewModel.cs
new file mode 100644
index 0000000..19f94a0
--- /dev/null
+++ b/CarouselViewChallenge/CarouselViewChallenge/ViewModels/ArticleViewModel.cs
@@ -0,0 +1,42 @@
+using CarouselViewChallenge.Models;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+
+namespace CarouselViewChallenge.ViewModels
+{
+ public class ArticleViewModel : INotifyPropertyChanged
+ {
+ public ObservableCollection articles { get; set; }
+
+ public ArticleViewModel()
+ {
+ articles = new ObservableCollection();
+
+ for (int i = 0; i < 10; i++)
+ {
+ Article temp = new Article
+ {
+ Article_title = $"نص المقالة {i + 1}",
+ Category = $"التصنيف {i + 1}",
+ Image = @"https://hbrarabic.com/wp-content/uploads/2019/09/هارفارد-بزنس-ريفيو-الابتكار-المزعزع.jpg",
+ Content = this.getContent()
+ };
+
+ articles.Add(temp);
+ }
+ }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ private void onPropertyChanged(string propertyName)
+ {
+ if (PropertyChanged != null)
+ PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+
+ private string getContent()
+ {
+ return "هذا النص اختبار هذا النص اختبار هذا النص اختبار هذا النص اختبار هذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبارهذا النص اختبار";
+ }
+ }
+}
diff --git a/CarouselViewChallenge/CarouselViewChallenge/Views/CarouselViewChallengePage.xaml b/CarouselViewChallenge/CarouselViewChallenge/Views/CarouselViewChallengePage.xaml
index 1a7cc0d..1a2fa19 100644
--- a/CarouselViewChallenge/CarouselViewChallenge/Views/CarouselViewChallengePage.xaml
+++ b/CarouselViewChallenge/CarouselViewChallenge/Views/CarouselViewChallengePage.xaml
@@ -1,13 +1,48 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CarouselViewChallenge/CarouselViewChallenge/Views/CarouselViewChallengePage.xaml.cs b/CarouselViewChallenge/CarouselViewChallenge/Views/CarouselViewChallengePage.xaml.cs
index 38f2e9f..dbe9b67 100644
--- a/CarouselViewChallenge/CarouselViewChallenge/Views/CarouselViewChallengePage.xaml.cs
+++ b/CarouselViewChallenge/CarouselViewChallenge/Views/CarouselViewChallengePage.xaml.cs
@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
+using CarouselViewChallenge.ViewModels;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
@@ -15,6 +10,9 @@ public partial class CarouselViewChallengePage : ContentPage
public CarouselViewChallengePage()
{
InitializeComponent();
+ ArticleViewModel vm = new ArticleViewModel();
+ BindingContext = vm;
+ this.cvArticles.ItemsSource = vm.articles;
}
}
}
\ No newline at end of file
diff --git a/rtl.gif b/rtl.gif
new file mode 100644
index 0000000..ffeca65
Binary files /dev/null and b/rtl.gif differ