Skip to content

Commit c965419

Browse files
committed
Changes are updated from Essential UI kit developmet source
1 parent ac06682 commit c965419

File tree

103 files changed

+3599
-4292
lines changed

Some content is hidden

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

103 files changed

+3599
-4292
lines changed

EssentialUIKit/AppLayout/TemplateList.xml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Samples>
33

4-
<Category Icon="log-in.png" IsUpdated="True" Name="Forms" Description="Get the user’s details to authenticate, create a profile, and enter credit card information for online payment portal.">
4+
<Category Icon="log-in.png" Name="Forms" Description="Get the user’s details to authenticate, create a profile, and enter credit card information for online payment portal.">
55
<Page Name="Simple Login Page" Description="If you want a simple and clean authentication form, just add this page to your application. Email validation is done within this form." PageName="Views.Forms.SimpleLoginPage"/>
66
<Page Name="Simple Sign Up Page" Description="This is a supporting form for a simple login page that can be modified to match any of your login pages on the fly. Email validation is done in this form." PageName="Views.Forms.SimpleSignUpPage"/>
77
<Page Name="Simple Reset Password Page" Description="This page is used for resetting a password with existing credentials or signing up if the user doesn’t have credentials yet." PageName="Views.Forms.SimpleResetPasswordPage"/>
@@ -13,20 +13,20 @@
1313
<Page Name="Add Contact Page" Description="This page allows users to add new contacts with additional information such as name, email address, and phone number." PageName="Views.Forms.AddContactPage"/>
1414
<Page Name="Tabbed Login Page" Description="This page is a multi-tabbed user interface where one tab provides a login page and another tab provides a sign-up form." PageName="Views.Forms.TabbedForm"/>
1515
<Page Name="Add Card Page" Description="This page allows users to enter their credit card information to be used in an online payment portal." PageName="Views.Forms.AddCardPage"/>
16-
<Page Name="Add Profile Page" IsNew="True" Description="This page allows users to add a new entry to their contacts with additional information such as name and phone number." PageName="Views.Forms.AddProfilePage"/>
16+
<Page Name="Add Profile Page" Description="This page allows users to add a new entry to their contacts with additional information such as name and phone number." PageName="Views.Forms.AddProfilePage"/>
1717
</Category>
1818

19-
<Category Icon="catalog.png" Name="Catalog" IsUpdated="True" Description="Let the users select from the list of items that includes titles, brief descriptions, and photos.">
19+
<Category Icon="catalog.png" Name="Catalog" Description="Let the users select from the list of items that includes titles, brief descriptions, and photos.">
2020
<Page Name="Category Tile Page" Description="Displaying an image with a title is a scenario in most applications, and this page categorizes product images and provides a title for the category." PageName="Views.Catalog.CategoryTilePage"/>
2121
<Page Name="Catalog Tile Page" Description="In any e-commerce application, showcasing a product with a rating and other details is mandatory. This page showcases a set of products with a short description, price, and user rating. " PageName="Views.Catalog.CatalogTilePage"/>
2222
<Page Name="Catalog List Page" Description="Displaying an image with some information is a scenario in many applications, and this page showcases product images with their titles, prices, and discounted prices." PageName="Views.Catalog.CatalogListPage"/>
2323
<Page Name="Article List Page" Description="This page displays featured articles with a rotator on top and the remaining stories displayed as a list. Each list card carries the image, title, author name, created date, and estimated time to read the article." PageName="Views.Catalog.ArticleListPage"/>
2424
<Page Name="Article Tile Page" Description="This page displays featured articles with a rotator on top and the remaining stories displayed as tiles. Each tile card contains the image, title, author name, created date, and estimated time to read the article." PageName="Views.Catalog.ArticleTilePage"/>
25-
<Page Name="Product Home Page" IsNew="True" Description="This page displays featured articles with a rotator at the top and the remaining stories displayed as tiles. Each tile card contains an image, title, author’s name, created date, and estimated time to read the article." PageName="Views.Catalog.ProductHomePage"/>
25+
<Page Name="Product Home Page" Description="This page displays featured articles with a rotator at the top and the remaining stories displayed as tiles. Each tile card contains an image, title, author’s name, created date, and estimated time to read the article." PageName="Views.Catalog.ProductHomePage"/>
2626
</Category>
2727

28-
<Category Icon="detail.png" IsUpdated="True" Name="Detail" Description="Display detailed and relevant information with random layouts.">
29-
<Page Name="Product Detail Page" IsUpdated="True" Description="This page showcases the complete details of a product with a rotator control to provide different images of the product, available size variants, product description, price, discount, and reviews." PageName="Views.Detail.DetailPage"/>
28+
<Category Icon="detail.png" Name="Detail" Description="Display detailed and relevant information with random layouts.">
29+
<Page Name="Product Detail Page" Description="This page showcases the complete details of a product with a rotator control to provide different images of the product, available size variants, product description, price, discount, and reviews." PageName="Views.Detail.DetailPage"/>
3030
<Page Name="Feedback Detail Page" Description="This page displays the full-page product image and user feedback consisting of a short description and rating." PageName="Views.Detail.FeedbackDetailPage"/>
3131
<Page Name="Article Detail Page" Description="This page displays an article with the title, image, and text." PageName="Views.Detail.ArticleDetailPage"/>
3232
</Category>
@@ -36,8 +36,9 @@
3636
<Page Name="Chat Conversation Page" Description="This page displays a recent conversation with a contact in a chat application. The page provides options to send files, images, or any other attachments as well as text messages." PageName="Views.Chat.ChatMessagePage" />
3737
</Category>
3838

39-
<Category Icon="article.png" IsNew="True" Name="Article" Description="Organize blog posts in an easy-to-navigate layout.">
39+
<Category Icon="article.png" IsUpdated="True" Name="Article" Description="Organize blog posts in an easy-to-navigate layout.">
4040
<Page Name="Article Detail with Comments Page" Description="This page displays an article with the title, image, and text." PageName="Views.Article.ArticleWithCommentsPage" />
41+
<Page Name="Article Parallax Header Page" IsNew="True" Description="This page displays an article with a pleasant parallax effect." PageName="Views.Article.ArticleParallaxHeaderPage" />
4142
<Page Name="My Article Page" Description="This page displays an article with the title, image, and text with customized layout." PageName="Views.Article.MyArticlePage" />
4243
</Category>
4344

@@ -62,7 +63,7 @@
6263
<Page Name="Navigation Tile Card Page" Description="This page displays an item as a card in a tile layout. Each tile contains an image of the item, its description, and an overall rating." PageName="Views.Navigation.NavigationTileCardPage"/>
6364
</Category>
6465

65-
<Category Icon="on-boarding.png" IsUpdated="True" Name="Onboarding" Description="Get your users started with a new app or experience with step-by--step instructions.">
66+
<Category Icon="on-boarding.png" Name="Onboarding" Description="Get your users started with a new app or experience with step-by--step instructions.">
6667
<Page Name="Walkthrough Page" Description="Guide users through a setup process on color gradient pages" PageName="Views.OnBoarding.OnBoardingAnimationPage"/>
6768
</Category>
6869

@@ -88,21 +89,21 @@
8889
<Page Name="Payment Page" Description="View card and payment details" PageName="Views.Transaction.PaymentPage" Platform="UWP"/>
8990
</Category>
9091

91-
<Category Icon="bookmark.png" IsUpdated="True" Name="Bookmark" Description="Interfaces for users to save shopping items, articles, or pages they’d like to return to later. Users can add or remove items they’ve saved as needed.">
92-
<Page Name="Wishlist Page" IsUpdated="True" Description="This page displays a list of items that an online shopper has saved to potentially purchase later." PageName="Views.Bookmarks.WishlistPage"/>
93-
<Page Name="Cart Page" IsUpdated="True" Description="This page displays a list of products as items added to a cart in a shopping application. The page also allows you to remove items from the shopping cart. " PageName="Views.Bookmarks.CartPage"/>
94-
<Page Name="Article Bookmarks Page" IsUpdated="True" Description="This page displays bookmarked articles in a list. Each list card carries the image, title, author name, created date, and estimated time to read the article." PageName="Views.Bookmarks.BookmarksPage"/>
92+
<Category Icon="bookmark.png" Name="Bookmark" Description="Interfaces for users to save shopping items, articles, or pages they’d like to return to later. Users can add or remove items they’ve saved as needed.">
93+
<Page Name="Wishlist Page" Description="This page displays a list of items that an online shopper has saved to potentially purchase later." PageName="Views.Bookmarks.WishlistPage"/>
94+
<Page Name="Cart Page" Description="This page displays a list of products as items added to a cart in a shopping application. The page also allows you to remove items from the shopping cart. " PageName="Views.Bookmarks.CartPage"/>
95+
<Page Name="Article Bookmarks Page" Description="This page displays bookmarked articles in a list. Each list card carries the image, title, author name, created date, and estimated time to read the article." PageName="Views.Bookmarks.BookmarksPage"/>
9596
</Category>
9697

9798
<Category Icon="history.png" Name="History" Description="Displays a list of recent actions performed by the user. It can also be used to show the recent transactions in financial apps or recent purchases in shopping apps. ">
9899
<Page Name="Transaction History Page" Description="This page displays the list of recent transactions." PageName="Views.History.TransactionHistoryPage"/>
99100
<Page Name="My Orders Page" Description="This page displays the list of the user’s recent orders." PageName="Views.History.MyOrdersPage"/>
100101
</Category>
101102

102-
<Category Icon="social.png" IsUpdated="True" Name="Social" Description="Layouts for social media profile pages with different features, such as follower counts, profile pictures, biographical information, and related profiles.">
103+
<Category Icon="social.png" Name="Social" Description="Layouts for social media profile pages with different features, such as follower counts, profile pictures, biographical information, and related profiles.">
103104
<Page Name="Social Profile with Connections Page" Description="This page displays a social media profile page with links to other profiles that the user may be interested in." PageName="Views.Social.SocialProfileWithConnectionsPage"/>
104105
<Page Name="Social Profile with Card Page" Description="This page displays a social media profile with a user’s image, location, and biographical information presented on a card." PageName="Views.Social.SocialProfileWithCardPage"/>
105-
<Page Name="Social Profile with Interest Page" IsNew="True" Description="This page displays a social media profile with a user’s image, location, interests, and biographical information presented on a card." PageName="Views.Social.SocialProfileWithInterestsPage"/>
106+
<Page Name="Social Profile with Interest Page" Description="This page displays a social media profile with a user’s image, location, interests, and biographical information presented on a card." PageName="Views.Social.SocialProfileWithInterestsPage"/>
106107
</Category>
107108

108109
<Category Icon="profile.png" Name="Profile" Description="Display various user profiles related to an article, chat user, and more.">
@@ -112,8 +113,8 @@
112113
<Page Name="Master Page" Description="This page displays an interactive burger menu of article pages. If you are working with a master-details page for articles, this page will be the master page for navigating across the application." PageName="Views.Profile.MasterPage"/>
113114
</Category>
114115

115-
<Category Icon="navigation.png" Name="Tracking" IsNew="True" Description="Displays various trackings like train status, product delivery status, and more.">
116-
<Page Name="Prodcut Delivery Tracking Page" Description="This page displays a current status with the estimated time of product delivery." PageName="Views.Tracking.ProductDeliveryTrackingPage"/>
116+
<Category Icon="navigation.png" Name="Tracking" Description="Displays various trackings like train status, product delivery status, and more.">
117+
<Page Name="Prodcut Delivery Tracking Page" Description="This page displays a live train’s present status with the estimated time of arrival at a specified destination." PageName="Views.Tracking.ProductDeliveryTrackingPage"/>
117118
</Category>
118119

119120
</Samples>
Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
using EssentialUIKit.Models;
2+
using Syncfusion.ListView.XForms;
3+
using Syncfusion.XForms.Buttons;
4+
using System;
5+
using System.Collections.Generic;
6+
using System.Text;
7+
using System.Threading.Tasks;
8+
using System.Windows.Input;
9+
using Xamarin.Forms;
10+
using Xamarin.Forms.Internals;
11+
12+
namespace EssentialUIKit.Behaviors
13+
{
14+
/// <summary>
15+
/// This class extends the behavior of the SfButton while deleting the list item with animation support.
16+
/// </summary>
17+
[Preserve(AllMembers = true)]
18+
public class ItemTemplateButtonBehavior : Behavior<SfButton>
19+
{
20+
#region Binable Properties
21+
22+
/// <summary>
23+
/// Bindable property to set the CommandProperty, and it is a bindable property..
24+
/// </summary>
25+
public static readonly BindableProperty CommandProperty =
26+
BindableProperty.Create(nameof(Command), typeof(ICommand), typeof(ItemTemplateButtonBehavior));
27+
28+
/// <summary>
29+
/// Bindable property to set the CommandParameterProperty, and it is a bindable property..
30+
/// </summary>
31+
public static BindableProperty CommandParameterProperty =
32+
BindableProperty.Create(nameof(CommandParameter), typeof(object), typeof(ItemTemplateButtonBehavior));
33+
34+
/// <summary>
35+
/// Bindable property to set the ParentEelementProperty, and it is a bindable property..
36+
/// </summary>
37+
public static BindableProperty ChildElementProperty =
38+
BindableProperty.Create(nameof(ChildElement), typeof(object), typeof(ItemTemplateButtonBehavior));
39+
40+
/// <summary>
41+
/// Bindable property to set the ChildEelementProperty, and it is a bindable property..
42+
/// </summary>
43+
public static BindableProperty ParentElementProperty =
44+
BindableProperty.Create(nameof(ParentElement), typeof(object), typeof(ItemTemplateButtonBehavior));
45+
46+
/// <summary>
47+
/// Gets or sets the selected index.
48+
/// </summary>
49+
private int selectedIndex;
50+
51+
/// <summary>
52+
/// Gets or sets the items count.
53+
/// </summary>
54+
private int childrenCount;
55+
56+
#endregion
57+
58+
#region Public Property
59+
60+
/// <summary>
61+
/// Gets or sets the Command.
62+
/// </summary>
63+
public ICommand Command
64+
{
65+
get { return (ICommand)GetValue(CommandProperty); }
66+
set { this.SetValue(CommandProperty, value); }
67+
}
68+
69+
/// <summary>
70+
/// Gets or sets the Command parameter.
71+
/// </summary>
72+
public object CommandParameter
73+
{
74+
get { return GetValue(CommandParameterProperty); }
75+
set { this.SetValue(CommandParameterProperty, value); }
76+
}
77+
78+
/// <summary>
79+
/// Gets or sets the Parent element.
80+
/// </summary>
81+
public object ParentElement
82+
{
83+
get { return GetValue(ParentElementProperty); }
84+
set { this.SetValue(ParentElementProperty, value); }
85+
}
86+
87+
/// <summary>
88+
/// Gets or sets the Child element.
89+
/// </summary>
90+
public object ChildElement
91+
{
92+
get { return GetValue(ChildElementProperty); }
93+
set { this.SetValue(ChildElementProperty, value); }
94+
}
95+
96+
#endregion
97+
98+
#region Methods
99+
100+
/// <summary>
101+
/// Invoked when adding sfbutton to view.
102+
/// </summary>
103+
/// <param name="comboBox">The ComboBox</param>
104+
protected override void OnAttachedTo(SfButton button)
105+
{
106+
base.OnAttachedTo(button);
107+
button.Clicked += Button_Clicked;
108+
}
109+
110+
/// <summary>
111+
/// Invoked when exit from the view.
112+
/// </summary>
113+
/// <param name="comboBox">The comboBox</param>
114+
protected override void OnDetachingFrom(SfButton button)
115+
{
116+
base.OnDetachingFrom(button);
117+
button.Clicked -= Button_Clicked;
118+
}
119+
120+
/// <summary>
121+
/// Invoked when button is clicked.
122+
/// </summary>
123+
/// <param name="comboBox">The comboBox</param>
124+
private async void Button_Clicked(object sender, EventArgs e)
125+
{
126+
SfButton sfButton = sender as SfButton;
127+
128+
// Animate the item when remove from list.
129+
if (ParentElement != null && ChildElement != null)
130+
{
131+
StackLayout mainStack = null;
132+
SfListView mainListview = null;
133+
var selectedElement = ChildElement as Grid;
134+
if (ParentElement is StackLayout)
135+
{
136+
mainStack = ParentElement as StackLayout;
137+
selectedIndex = mainStack.Children.IndexOf(selectedElement);
138+
childrenCount = mainStack.Children.Count;
139+
}
140+
else if (ParentElement is SfListView)
141+
{
142+
mainListview = ParentElement as SfListView;
143+
selectedIndex = mainListview.Children.IndexOf(selectedElement);
144+
childrenCount = mainListview.Children.Count;
145+
}
146+
if (mainStack != null || mainListview != null)
147+
{
148+
await selectedElement.TranslateTo(-100, 0, 100);
149+
await selectedElement.FadeTo(0, 20);
150+
151+
List<Task> animations = new List<Task>();
152+
153+
for (int i = selectedIndex + 1; i < childrenCount; i++)
154+
{
155+
VisualElement elementToMove;
156+
elementToMove = mainStack == null? mainListview.Children[i] : mainStack.Children[i];
157+
var boundsToMoveTo = elementToMove.Bounds;
158+
boundsToMoveTo.Top -= selectedElement.Height;
159+
animations.Add(elementToMove.LayoutTo(boundsToMoveTo, 200, Easing.Linear));
160+
}
161+
await selectedElement.FadeTo(0, 20);
162+
await Task.WhenAll(animations);
163+
}
164+
}
165+
166+
if (this.Command == null)
167+
return;
168+
this.Command.Execute(sfButton.CommandParameter);
169+
}
170+
171+
#endregion
172+
}
173+
}

0 commit comments

Comments
 (0)