Skip to content

Commit 7216719

Browse files
Essential UIKit new page changes committed. (#39)
* Essential UIKit new page review changes were committed.
1 parent ad599c0 commit 7216719

File tree

82 files changed

+757
-16601
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+757
-16601
lines changed

EssentialUIKit.Android/EssentialUIKit.Android.csproj

100644100755
File mode changed.
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.syncfusion.EssentialUIKit" android:installLocation="auto">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="7" android:versionName="6.0" package="com.syncfusion.xamarin.uikit" android:installLocation="internalOnly">
33
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
44
<application android:label="Essential UI Kit"></application>
55
</manifest>

EssentialUIKit.Android/Resources/Resource.designer.cs

-16,232
This file was deleted.

EssentialUIKit.UWP/EssentialUIKit.UWP.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<FileAlignment>512</FileAlignment>
1919
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
2020
<PackageCertificateKeyFile>EssentialUIKit.UWP_TemporaryKey.pfx</PackageCertificateKeyFile>
21-
<PackageCertificateThumbprint>7C9B62B0DB4A9BB4B30582DB30615CF2470FEC43</PackageCertificateThumbprint>
21+
<PackageCertificateThumbprint>0D118D5BBF91F66E731C1579C6AABF13030FECBF</PackageCertificateThumbprint>
2222
</PropertyGroup>
2323
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
2424
<DebugSymbols>true</DebugSymbols>
Binary file not shown.
Binary file not shown.

EssentialUIKit/AppLayout/Controls/ParallaxListView.cs

+13-6
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,27 @@ public ParallaxListView() : base(ListViewCachingStrategy.RetainElement)
2424

2525
public static void OnScrollChanged(object sender, ScrollChangedEventArgs e)
2626
{
27-
((ParallaxListView)sender).ScrollChanged?.Invoke((ParallaxListView)sender, e);
27+
((ParallaxListView)sender)?.ScrollChanged?.Invoke((ParallaxListView)sender, e);
2828
}
2929

3030
public static void OnSelectionChanged(object sender, SelectedItemChangedEventArgs e)
3131
{
32-
((ParallaxListView)sender).SelectionChanged(sender, e);
33-
((ParallaxListView)sender).SelectedItem = e.SelectedItem;
34-
((ParallaxListView)sender).SelectedItem = null;
32+
ParallaxListView listView = (ParallaxListView)sender;
33+
if (listView != null)
34+
{
35+
listView.SelectionChanged(sender, e);
36+
listView.SelectedItem = e.SelectedItem;
37+
listView.SelectedItem = null;
38+
}
3539
}
3640

3741
public static void OnSelectionChanged(object sender, int index)
3842
{
39-
var listView = sender as ParallaxListView;
40-
OnSelectionChanged(sender, new SelectedItemChangedEventArgs((listView.ItemsSource as IList)[index], index));
43+
if (sender is ParallaxListView)
44+
{
45+
var listView = sender as ParallaxListView;
46+
OnSelectionChanged(sender, new SelectedItemChangedEventArgs((listView.ItemsSource as IList)[index], index));
47+
}
4148
}
4249

4350
private void ParallaxListView_ItemSelected(object sender, SelectedItemChangedEventArgs e)

EssentialUIKit/AppLayout/TemplateList.xml

+10
Original file line numberDiff line numberDiff line change
@@ -144,5 +144,15 @@
144144
<Page Name="Task Notification Page" IsNew="True" Description="This page displays notifications for tasks, showing descriptions, task IDs, and times." PageName="Views.Notification.TaskNotificationPage"/>
145145
<Page Name="Social Notification Page" IsNew="True" Description="This page displays social media notifications, containing a list of recent notifications and a list of earlier ones." PageName="Views.Notification.SocialNotificationPage"/>
146146
</Category>
147+
148+
<!--<Category Name="Shopping" Description="Simple shopping flow, fetturing catalog detail, cart detail and product checkout.">
149+
<Page Name="Login Page" Description="If you want a simple and clean authentication form, then just add this page to your application. Email validation is done within this form." PageName="Views.Shopping.LoginPage"/>
150+
<Page Name="Shopping Home Page" Description="Simple shopping flow, fetturing catalog detail, cart detail and product checkout" PageName="Views.Shopping.CatalogListPage"/>
151+
<Page Name="Detail Page" Description="View detailed information regarding your orders" PageName="Views.Shopping.DetailPage" />
152+
<Page Name="Shopping Cart Page" Description="View items in your cart for purchase. " PageName="Views.Shopping.CartPage" />
153+
<Page Name="Checkout page" Description="Purchase items in your cart" PageName="Views.Shopping.CheckoutPage"/>
154+
<Page Name="Payment success page" Description="This page notifies the user that their payment was successful." PageName="Views.Shopping.PaymentSuccessPage"/>
155+
<Page Name="Walkthrough animation Page" Description="Guide users through a setup process on color gradient pages" PageName="Views.Shopping.OnBoardingAnimationPage"/>
156+
</Category>-->
147157

148158
</Samples>

EssentialUIKit/AppLayout/Utils.cs

+21-15
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,34 @@ public static class Extensions
1010
{
1111
public static void ApplyDarkTheme(this ResourceDictionary resources)
1212
{
13-
var mergedDictionaries = resources.MergedDictionaries;
14-
var lightTheme = mergedDictionaries.OfType<LightTheme>().FirstOrDefault();
15-
if (lightTheme != null)
13+
if (resources != null)
1614
{
17-
mergedDictionaries.Remove(lightTheme);
18-
}
15+
var mergedDictionaries = resources.MergedDictionaries;
16+
var lightTheme = mergedDictionaries.OfType<LightTheme>().FirstOrDefault();
17+
if (lightTheme != null)
18+
{
19+
mergedDictionaries.Remove(lightTheme);
20+
}
1921

20-
// mergedDictionaries.Add(new DarkTheme());
21-
AppSettings.Instance.IsDarkTheme = true;
22+
// mergedDictionaries.Add(new DarkTheme());
23+
AppSettings.Instance.IsDarkTheme = true;
24+
}
2225
}
2326

2427
public static void ApplyLightTheme(this ResourceDictionary resources)
2528
{
26-
var mergedDictionaries = resources.MergedDictionaries;
29+
if (resources != null)
30+
{
31+
var mergedDictionaries = resources.MergedDictionaries;
2732

28-
// var darkTheme = mergedDictionaries.OfType<DarkTheme>().FirstOrDefault();
29-
// if (darkTheme != null)
30-
// {
31-
// mergedDictionaries.Remove(darkTheme);
32-
// }
33-
mergedDictionaries.Add(new LightTheme());
34-
AppSettings.Instance.IsDarkTheme = false;
33+
// var darkTheme = mergedDictionaries.OfType<DarkTheme>().FirstOrDefault();
34+
// if (darkTheme != null)
35+
// {
36+
// mergedDictionaries.Remove(darkTheme);
37+
// }
38+
mergedDictionaries.Add(new LightTheme());
39+
AppSettings.Instance.IsDarkTheme = false;
40+
}
3541
}
3642

3743
public static void ApplyColorSet(int index)

EssentialUIKit/AppLayout/ViewModels/HomePageViewModel.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,12 @@ private void PopulateList()
143143

144144
public static string GetDataFromXmlReader(XmlReader reader, string attribute)
145145
{
146-
reader.MoveToAttribute(attribute);
147-
return reader.Value;
146+
if (reader != null)
147+
{
148+
reader.MoveToAttribute(attribute);
149+
return reader.Value;
150+
}
151+
return string.Empty;
148152
}
149153

150154
private string GetUpdateType(string value, string type)

EssentialUIKit/AppLayout/Views/TemplateHostPage.xaml.cs

+5-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ public TemplateHostPage(Template selectedTemplate)
2929
TemplateHostView.HeightRequest = HostViewContainer.HeightRequest = Application.Current.MainPage.Height - 55;
3030
TemplateHostView.WidthRequest = HostViewContainer.WidthRequest = Application.Current.MainPage.Width;
3131

32-
Title.Text = selectedTemplate.Name;
33-
34-
this.LoadPage(selectedTemplate.PageName);
32+
if (selectedTemplate != null)
33+
{
34+
Title.Text = selectedTemplate.Name;
35+
this.LoadPage(selectedTemplate.PageName);
36+
}
3537
}
3638

3739
#endregion

EssentialUIKit/Behaviors/BorderlessEntryCVVBehavior.cs

+14-8
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,13 @@ public class BorderlessEntryCVVBehavior : Behavior<BorderlessEntry>
2929
/// <param name="borderlessEntry">The borderlessEntry</param>
3030
protected override void OnAttachedTo(BorderlessEntry borderlessEntry)
3131
{
32-
base.OnAttachedTo(borderlessEntry);
33-
this.BorderlessEntry = borderlessEntry;
34-
borderlessEntry.BindingContextChanged += this.OnBindingContextChanged;
35-
borderlessEntry.TextChanged += this.OnTextChanged;
32+
if (borderlessEntry != null)
33+
{
34+
base.OnAttachedTo(borderlessEntry);
35+
this.BorderlessEntry = borderlessEntry;
36+
borderlessEntry.BindingContextChanged += this.OnBindingContextChanged;
37+
borderlessEntry.TextChanged += this.OnTextChanged;
38+
}
3639
}
3740

3841
/// <summary>
@@ -41,10 +44,13 @@ protected override void OnAttachedTo(BorderlessEntry borderlessEntry)
4144
/// <param name="borderlessEntry">The borderlessEntry</param>
4245
protected override void OnDetachingFrom(BorderlessEntry borderlessEntry)
4346
{
44-
base.OnDetachingFrom(borderlessEntry);
45-
borderlessEntry.BindingContextChanged -= this.OnBindingContextChanged;
46-
borderlessEntry.TextChanged -= this.OnTextChanged;
47-
this.BorderlessEntry = null;
47+
if (borderlessEntry != null)
48+
{
49+
base.OnDetachingFrom(borderlessEntry);
50+
borderlessEntry.BindingContextChanged -= this.OnBindingContextChanged;
51+
borderlessEntry.TextChanged -= this.OnTextChanged;
52+
this.BorderlessEntry = null;
53+
}
4854
}
4955

5056
/// <summary>

EssentialUIKit/Behaviors/Catalog/CartBehavior.cs

+12-7
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,24 @@ public class CartBehavior : Behavior<ContentPage>
2424
/// <param name="bindableContentPage">Bindable ContentPage</param>
2525
protected override void OnAttachedTo(ContentPage bindableContentPage)
2626
{
27-
base.OnAttachedTo(bindableContentPage);
28-
this.bindablePage = bindableContentPage;
29-
bindableContentPage.Appearing += this.Bindable_Appearing;
30-
}
31-
27+
if (bindableContentPage != null)
28+
{
29+
base.OnAttachedTo(bindableContentPage);
30+
this.bindablePage = bindableContentPage;
31+
bindableContentPage.Appearing += this.Bindable_Appearing;
32+
}
33+
}
3234
/// <summary>
3335
/// Invoked when exit from the page.
3436
/// </summary>
3537
/// <param name="bindableContentPage">Content Page</param>
3638
protected override void OnDetachingFrom(ContentPage bindableContentPage)
3739
{
38-
base.OnDetachingFrom(bindableContentPage);
39-
bindableContentPage.Appearing -= this.Bindable_Appearing;
40+
if (bindableContentPage != null)
41+
{
42+
base.OnDetachingFrom(bindableContentPage);
43+
bindableContentPage.Appearing -= this.Bindable_Appearing;
44+
}
4045
}
4146

4247
/// <summary>

EssentialUIKit/Behaviors/Chat/ChatMessageListViewBehavior.cs

+7-4
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@ public class ChatMessageListViewBehavior : Behavior<SfListView>
2727
/// <param name="bindable">The SfListView</param>
2828
protected override void OnAttachedTo(SfListView bindable)
2929
{
30-
base.OnAttachedTo(bindable);
31-
this.listView = bindable;
32-
this.listView.Loaded += this.ListView_Loaded;
33-
this.listView.DataSource.SourceCollectionChanged += this.DataSource_SourceCollectionChanged;
30+
if (bindable != null)
31+
{
32+
base.OnAttachedTo(bindable);
33+
this.listView = bindable;
34+
this.listView.Loaded += this.ListView_Loaded;
35+
this.listView.DataSource.SourceCollectionChanged += this.DataSource_SourceCollectionChanged;
36+
}
3437
}
3538

3639
/// <summary>

EssentialUIKit/Behaviors/Dashboard/SegmentedControlSelectionBehavior.cs

+14-8
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,13 @@ public object ParentBindingContext
7575
/// <param name="segmentedControl">Segmented Control</param>
7676
protected override void OnAttachedTo(SfSegmentedControl segmentedControl)
7777
{
78-
base.OnAttachedTo(segmentedControl);
79-
this.SegmentedControl = segmentedControl;
80-
segmentedControl.BindingContextChanged += this.OnBindingContextChanged;
81-
segmentedControl.SelectionChanged += this.OnSelectionChanged;
78+
if (segmentedControl != null)
79+
{
80+
base.OnAttachedTo(segmentedControl);
81+
this.SegmentedControl = segmentedControl;
82+
segmentedControl.BindingContextChanged += this.OnBindingContextChanged;
83+
segmentedControl.SelectionChanged += this.OnSelectionChanged;
84+
}
8285
}
8386

8487
/// <summary>
@@ -87,10 +90,13 @@ protected override void OnAttachedTo(SfSegmentedControl segmentedControl)
8790
/// <param name="segmentedControl">Segmented Control</param>
8891
protected override void OnDetachingFrom(SfSegmentedControl segmentedControl)
8992
{
90-
base.OnDetachingFrom(segmentedControl);
91-
segmentedControl.BindingContextChanged -= this.OnBindingContextChanged;
92-
segmentedControl.SelectionChanged -= this.OnSelectionChanged;
93-
this.SegmentedControl = null;
93+
if (segmentedControl != null)
94+
{
95+
base.OnDetachingFrom(segmentedControl);
96+
segmentedControl.BindingContextChanged -= this.OnBindingContextChanged;
97+
segmentedControl.SelectionChanged -= this.OnSelectionChanged;
98+
this.SegmentedControl = null;
99+
}
94100
}
95101

96102
/// <summary>

EssentialUIKit/Behaviors/Detail/CartBehavior.cs

+11-5
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,12 @@ public class CartBehavior : Behavior<ContentPage>
2626
/// <param name="bindableContentPage">Content Page</param>
2727
protected override void OnAttachedTo(ContentPage bindableContentPage)
2828
{
29-
base.OnAttachedTo(bindableContentPage);
30-
this.bindablePage = bindableContentPage;
31-
bindableContentPage.Appearing += this.Bindable_Appearing;
29+
if (bindableContentPage != null)
30+
{
31+
base.OnAttachedTo(bindableContentPage);
32+
this.bindablePage = bindableContentPage;
33+
bindableContentPage.Appearing += this.Bindable_Appearing;
34+
}
3235
}
3336

3437
/// <summary>
@@ -47,8 +50,11 @@ private void Bindable_Appearing(object sender, EventArgs e)
4750
/// <param name="bindableContentPage">Content Page</param>
4851
protected override void OnDetachingFrom(ContentPage bindableContentPage)
4952
{
50-
base.OnDetachingFrom(bindableContentPage);
51-
bindableContentPage.Appearing -= this.Bindable_Appearing;
53+
if (bindableContentPage != null)
54+
{
55+
base.OnDetachingFrom(bindableContentPage);
56+
bindableContentPage.Appearing -= this.Bindable_Appearing;
57+
}
5258
}
5359

5460
#endregion

EssentialUIKit/Behaviors/ECommerce/ExpanderBehavior.cs

+14-8
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,13 @@ public object CommandParameter
5959
/// <param name="expander">The SfExpander</param>
6060
protected override void OnAttachedTo(SfExpander expander)
6161
{
62-
base.OnAttachedTo(expander);
63-
this.Expander = expander;
64-
expander.BindingContextChanged += this.OnBindingContextChanged;
65-
expander.Expanding += this.OnExpanding;
62+
if (expander != null)
63+
{
64+
base.OnAttachedTo(expander);
65+
this.Expander = expander;
66+
expander.BindingContextChanged += this.OnBindingContextChanged;
67+
expander.Expanding += this.OnExpanding;
68+
}
6669
}
6770

6871
/// <summary>
@@ -71,10 +74,13 @@ protected override void OnAttachedTo(SfExpander expander)
7174
/// <param name="expander">The SfExpander</param>
7275
protected override void OnDetachingFrom(SfExpander expander)
7376
{
74-
base.OnDetachingFrom(expander);
75-
expander.BindingContextChanged -= this.OnBindingContextChanged;
76-
expander.Expanding -= this.OnExpanding;
77-
this.Expander = null;
77+
if (expander != null)
78+
{
79+
base.OnDetachingFrom(expander);
80+
expander.BindingContextChanged -= this.OnBindingContextChanged;
81+
expander.Expanding -= this.OnExpanding;
82+
this.Expander = null;
83+
}
7884
}
7985

8086
/// <summary>

EssentialUIKit/Behaviors/ECommerce/FrameTapBehavior.cs

+7-4
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,13 @@ public object CommandParameter
4242
/// <param name="bindableFrame">The Frame</param>
4343
protected override void OnAttachedTo(Frame bindableFrame)
4444
{
45-
base.OnAttachedTo(bindableFrame);
46-
this.tapGestureRecognizer = new TapGestureRecognizer();
47-
this.tapGestureRecognizer.Tapped += this.TapGestureRecognizer_Tapped;
48-
bindableFrame.GestureRecognizers.Add(this.tapGestureRecognizer);
45+
if (bindableFrame != null)
46+
{
47+
base.OnAttachedTo(bindableFrame);
48+
this.tapGestureRecognizer = new TapGestureRecognizer();
49+
this.tapGestureRecognizer.Tapped += this.TapGestureRecognizer_Tapped;
50+
bindableFrame.GestureRecognizers.Add(this.tapGestureRecognizer);
51+
}
4952
}
5053

5154
/// <summary>

EssentialUIKit/Behaviors/ExpanderCommandBehavior.cs

+16-10
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,14 @@ public object ChildElement
7474
/// <param name="expander">Segmented Control</param>
7575
protected override void OnAttachedTo(SfExpander expander)
7676
{
77-
base.OnAttachedTo(expander);
78-
this.ExpanderControl = expander;
79-
expander.BindingContextChanged += this.OnBindingContextChanged;
80-
expander.Expanded += Expander_Expanded;
81-
expander.Collapsed += Expander_Collapsed;
77+
if (expander != null)
78+
{
79+
base.OnAttachedTo(expander);
80+
this.ExpanderControl = expander;
81+
expander.BindingContextChanged += this.OnBindingContextChanged;
82+
expander.Expanded += Expander_Expanded;
83+
expander.Collapsed += Expander_Collapsed;
84+
}
8285
}
8386

8487

@@ -88,11 +91,14 @@ protected override void OnAttachedTo(SfExpander expander)
8891
/// <param name="expander">Segmented Control</param>
8992
protected override void OnDetachingFrom(SfExpander expander)
9093
{
91-
base.OnDetachingFrom(expander);
92-
expander.BindingContextChanged -= this.OnBindingContextChanged;
93-
expander.Expanded -= this.Expander_Expanded;
94-
expander.Collapsed -= Expander_Collapsed;
95-
this.ExpanderControl = null;
94+
if (expander != null)
95+
{
96+
base.OnDetachingFrom(expander);
97+
expander.BindingContextChanged -= this.OnBindingContextChanged;
98+
expander.Expanded -= this.Expander_Expanded;
99+
expander.Collapsed -= Expander_Collapsed;
100+
this.ExpanderControl = null;
101+
}
96102
}
97103

98104
/// <summary>

0 commit comments

Comments
 (0)