{"id":44260,"date":"2019-06-12T10:07:51","date_gmt":"2019-06-12T17:07:51","guid":{"rendered":"http:\/\/devblogs.microsoft.com\/xamarin\/?p=44260"},"modified":"2019-08-30T08:28:56","modified_gmt":"2019-08-30T15:28:56","slug":"grial-ui-kit-xamarin-forms","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/xamarin\/grial-ui-kit-xamarin-forms\/","title":{"rendered":"Grial UI Kit: Building Beautiful Xamarin.Forms Apps, Faster"},"content":{"rendered":"<p><i>This post was guest authored and contributed by Leonardo Viacava. Leo is co-founder and CTO of <a href=\"http:\/\/uxdivers.com\">UXDivers<\/a>, creators of <a href=\"http:\/\/grialkit.com\">Grial UI Kit<\/a> and <a href=\"http:\/\/gorillaplayer.com\">Gorilla Player<\/a>. UXDivers specializes in designing and coding engaging mobile experiences using Xamarin technologies.<\/i><\/p>\n<h2>Grial UI Kit<\/h2>\n<p><a href=\"http:\/\/grialkit.com\/?utm_source=BlogG3Microsoft&amp;utm_medium=Post\">Grial UI Kit<\/a> provides XAML templates, custom controls, helpers and resources that accelerate the creation of Xamarin.Forms apps. We make it dead simple for .NET developers to build beautiful cross-platform apps, fast.<\/p>\n<p>Let\u2019s take a look at how <a href=\"http:\/\/grialkit.com\/?utm_source=BlogG3Microsoft&amp;utm_medium=Post\">Grial UI Kit<\/a> can help you build a great app.<\/p>\n<p>Below you can see an overview of the screens for a Tea Shop app called <strong>Clayton<\/strong>. The app took us <strong>20 minutes<\/strong> to build, this blog took us much longer to write \ud83d\ude42<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-44262\" src=\"http:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/05\/AppScreens.png\" alt=\"Grial UI Kit for Tea Shop app Clayton\" width=\"2595\" height=\"2141\" srcset=\"https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/05\/AppScreens.png 2560w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/05\/AppScreens-300x248.png 300w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/05\/AppScreens-768x634.png 768w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/05\/AppScreens-1024x845.png 1024w\" sizes=\"(max-width: 2595px) 100vw, 2595px\" \/><\/p>\n<p>After you read this blog, watch this <a href=\"https:\/\/youtu.be\/Gct702Y4VwQ\">video<\/a> to see the complete process described below at normal speed.<\/p>\n<h2 id=\"creatingabeautifulappinminutes\">Creating a Beautiful App in Minutes<\/h2>\n<h3 id=\"creatingtheapp\">Creating the App<\/h3>\n<p>Grial based apps are created with our <a href=\"https:\/\/admin.grialkit.com\/?utm_source=BlogG3Microsoft&amp;utm_medium=Post\">Grial Wb Admin<\/a> site, which allows you to create and manage your apps. There are 5 simple steps to create your app:<\/p>\n<ol>\n<li><strong>Register your App<\/strong>. Select your license and create the app.<\/li>\n<li><strong>App Name<\/strong>. Give your app a name \ud83d\ude42<\/li>\n<li><strong>Project Setup<\/strong>. Enter the solution name, project name, namespace, assembly name and bundle identifier. All of these are auto-suggested based on the app name.<\/li>\n<li><strong>Screens<\/strong>. Choose any, and as many, screens from our 90+ cataloge to kick start your app.<\/li>\n<li><strong>Icon and Theme<\/strong>. Upload a high-resolution image of your app icon. <a href=\"https:\/\/admin.grialkit.com\/?utm_source=BlogG3Microsoft&amp;utm_medium=Post\">Grial Wb Admin<\/a> automatically generates all the required icon resolutions for iOS and Android. Select a theme to use. You can use the theme as it is, or choose to customize its accent color to match your brand\u2019s look and feel.<\/li>\n<\/ol>\n<p>Now, you can download the Visual Studio solution ready to run, and you can start working on your app. The downloaded Grial solution uses your specified names, app icon and theme. It includes all your selected screens plus any accessory views used by those screens. You can add more screens later if you need to.<\/p>\n<h3 id=\"creatingtheapp\">Watch it in Action<\/h3>\n<p>Watch the video below to see the 5 steps wizard creation process using <a href=\"https:\/\/admin.grialkit.com\/?utm_source=BlogG3Microsoft&amp;utm_medium=Post\">Grial Web Admin<\/a>\u00a0and the download and running of the <strong>Clayton<\/strong> app with Visual Studio.<\/p>\n<p><center>\n<iframe width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/n49l0tbc47Y\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/center><\/p>\n<h3 id=\"creatingtheapp\">Downloading the Solution<\/h3>\n<p>The downloaded Visual Studio solution includes:<\/p>\n<ol>\n<li>XAML files for the selected screens and all accessory views<\/li>\n<li>The App Theme<\/li>\n<li>A View Model for each page<\/li>\n<li>Sample data in JSON format<\/li>\n<li>All helpers\/resources required by the app to work<\/li>\n<\/ol>\n<p>The solution also references a NuGet package called <code>UXDivers.Grial<\/code> that contains Grial custom controls, effects, custom renderers, and more. It also includes other popular community NuGet packages (e.g. <code>Xamarin.Essentials<\/code>, <code>Xamarin.FFImageLoading<\/code>, <code>Newtonsoft.Json<\/code>).<\/p>\n<p>In the video, the downloaded app uses a master-detail navigation that includes a link for each page. You can tweak the code to add or remove links.<\/p>\n<h3 id=\"creatingtheapp\">Using Gorilla Player<\/h3>\n<p>The options to customize your app pages are endless. You can remove or add sections, create new ones by combining parts of existing ones, or just keep them as they are. Preview your XAML file customizations instantly using Grial\u2019s best friend: <a href=\"https:\/\/grialkit.com\/gorilla-player\/?utm_source=BlogG3Microsoft&amp;utm_medium=Post\">Gorilla Player<\/a> (pre-configured for all Grial apps, read more about Gorilla in this <a href=\"https:\/\/devblogs.microsoft.com\/xamarin\/gorilla-player-a-tool-to-craft-beautiful-xaml-uis-for-xamarin-forms\">previous post<\/a>).<\/p>\n<p>A note on Data: Grial pages have no hardcoded data, all data comes from View Models through data bindings. The View Models read Grial\u2019s sample data from JSON files, which means manipulating the data of your prototypes is super easy. Once the prototype is ready, connect the View Models to the real data source with no impact to the XAML code of your pages.<\/p>\n<h3 id=\"customizingtheapp\">Customizing the App<\/h3>\n<p>Watch the video below to see how we used <a href=\"https:\/\/grialkit.com\/gorilla-player\/?utm_source=BlogG3Microsoft&amp;utm_medium=Post\">Gorilla Player<\/a> to customize the <strong>Clayton Tea Shop<\/strong> app. Note the following:<\/p>\n<ul>\n<li><strong>XAML customization<\/strong>. We customized (1) the e-commerce main page <code>EcommerceMainPage<\/code>, (2) the product detail page <code>ProductDetailPage<\/code> and (3) the walkthrough <code>WalkthroughIllustrationPage<\/code>.\n<ol>\n<li>The search bar from the navigation bar was removed and page title changed.<\/li>\n<li>The product color picker was also removed as it did not apply to the Tea Shop domain. Page title was changed and other minor tweaks were made.<\/li>\n<li>Adjusted images and texts.<\/li>\n<\/ol>\n<\/li>\n<li><strong>Data manipulation<\/strong>. The <code>DesignTimeData.json<\/code> file (where <a href=\"https:\/\/grialkit.com\/gorilla-player\/?utm_source=BlogG3Microsoft&amp;utm_medium=Post\">Gorilla Player<\/a> stores its design-time data) was updated. Making the data for the e-commerce main page (<code>EcommerceMainPage<\/code>) and the product detail page (<code>ProductDetailPage<\/code>) relevant to the Tea Shop context. To get the running prototype as shown in the video, you also need to update the Grial JSON sample data files for the <code>EcommerceMainPage<\/code>.<\/li>\n<li><strong>Navigation<\/strong>. We removed the unnecessary screens from the master page by updating the <code>MainMenuViewModel<\/code> class. Set the e-commerce main page (<code>EcommerceMainPage<\/code>) as the app\u2019s initial page. And used a modal page to display the introductory walkthrough (<code>WalkthroughIllustrationPage<\/code>) right after the app starts.<\/li>\n<\/ul>\n<p><center>\n<iframe width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/3REWDzOUdYo\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/center>By the end of the video, tapping on a tea item in the e-commerce main page automatically navigates to the correspondent tea item detail page. Because these pages belong to the Grial\u2019s <em>Ecommerce Flow<\/em>, and Grial Flows are like mini-apps, the screens are already interconnected. This is out-of-the-box behavior for Grial Flows.<\/p>\n<p>The image below gives an overview of the screens transformed by this first round of tweaks.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-44263\" src=\"http:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/05\/Round1-2.png\" alt=\"\" width=\"682\" height=\"625\" srcset=\"https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/05\/Round1-2.png 682w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/05\/Round1-2-300x275.png 300w\" sizes=\"(max-width: 682px) 100vw, 682px\" \/><\/p>\n<h3 id=\"addinganewfunctionality\">Adding a New Functionality<\/h3>\n<p>Let\u2019s say you love green tea. How do you explore the full category without going into each item individually while still getting more product details than its name and photo?<\/p>\n<p>You add a <em>See All<\/em> button to the categories in the main page (<code>EcommerceMainPage<\/code>) and a command to navigate to the <code>ProductCatalogPage<\/code> passing the correspondent category items. To tailor it further, we modified the XAML file of the list items template (<code>ProductsCatalogItemTemplate<\/code>) to remove the Save\/Compare\/Share buttons, adjust the image aspect, and include the item\u2019s price.<\/p>\n<p><center>\n<iframe width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/3REWDzOUdYo\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/center>BOOM! Your app is ready! Below are the two screens tweaked in this final round.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-44264\" src=\"http:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/05\/Round3.png\" alt=\"\" width=\"682\" height=\"300\" srcset=\"https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/05\/Round3.png 682w, https:\/\/devblogs.microsoft.com\/xamarin\/wp-content\/uploads\/sites\/44\/2019\/05\/Round3-300x132.png 300w\" sizes=\"(max-width: 682px) 100vw, 682px\" \/><\/p>\n<p>Well&#8230; clearly there\u2019s still work to do before you would consider the app done. For instance, some screens are missing and the View Models are reading sample data instead of data from a backend. In any case, what we wanted you to see is how fast you can build a beautiful, cross-platform app using Xamarin.Forms and <a href=\"http:\/\/grialkit.com\/?utm_source=BlogG3Microsoft&amp;utm_medium=Post\">Grial UI Kit<\/a>.<\/p>\n<p>For a tour of the full 20 minutes process, at normal speed, check this <a href=\"https:\/\/youtu.be\/Gct702Y4VwQ\">video<\/a>.<\/p>\n<p><em>Note: the videos show only the iOS app, but the Android app looks just as great.<\/em><\/p>\n<h2 id=\"grial3\">Grial UI Kit 3<\/h2>\n<p><a href=\"https:\/\/grialkit.com\/whats-new-in-3-0\/?utm_source=BlogG3Microsoft&amp;utm_medium=Post\">Grial UI Kit 3<\/a> is the latest, and greatest version of Grial yet. With over 160 fully themeable, customizable and extensible XAML files, building beautiful Xamarin.Forms apps is now faster than ever.<\/p>\n<p>This version comes with:<\/p>\n<ul>\n<li>15 custom controls, including data grid, video player, tab control, card view, and checkbox.<\/li>\n<li>Gradients support, everywhere.<\/li>\n<li>Animations for a more engaging experience.<\/li>\n<li>6k scalable icons.<\/li>\n<li>Responsive Helpers to simplify building multi-form factor layouts.<\/li>\n<li>Built-in localization support, with instant runtime switch.<\/li>\n<li>Right-to-Left support for all views, with instant runtime switch.<\/li>\n<li>6 predefined, yet customizable themes.<\/li>\n<li>Fast project setup with Grial Web Admin.<\/li>\n<\/ul>\n<h2 id=\"learnmore\">Learn More<\/h2>\n<p>To learn more about Grial, please visit <a href=\"http:\/\/grialkit.com\/?utm_source=BlogG3Microsoft&amp;utm_medium=Post\">grialkit.com<\/a>, for more technical and detailed information go to <a href=\"http:\/\/docs.grialkit.com\/?utm_source=BlogG3Microsoft&amp;utm_medium=Post\">docs.grialkit.com<\/a>. Download the Demo app, available in <a href=\"https:\/\/itunes.apple.com\/app\/grial-uikit\/id1099501310\">iOS<\/a> and <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=uxdivers.grial\">Android<\/a>, to experience what you can build with Xamarin.Forms and <a href=\"http:\/\/grialkit.com\/?utm_source=BlogG3Microsoft&amp;utm_medium=Post\">Grial UI Kit<\/a>.<\/p>\n<p>All the videos shown here are available in this <a href=\"https:\/\/www.youtube.com\/playlist?list=PLh2RPrJLnLGooxr8oCTaNQt6deAC5FqVy\">playlist<\/a>. We\u2019d love to hear your feedback on Twitter <a href=\"https:\/\/twitter.com\/grialkit\">@grialkit<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>See how the Grial UI Kit from UX Divers provides XAML templates, custom controls, helpers and resources that accelerate the creation of Xamarin.Forms apps. We make it dead simple for .NET developers to build beautiful cross-platform apps, fast.<\/p>\n","protected":false},"author":879,"featured_media":44262,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2,367],"tags":[5479,5481,5480],"class_list":["post-44260","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-developers","category-xamarin-forms","tag-guest-blog","tag-toolkit","tag-ui-design"],"acf":[],"blog_post_summary":"<p>See how the Grial UI Kit from UX Divers provides XAML templates, custom controls, helpers and resources that accelerate the creation of Xamarin.Forms apps. We make it dead simple for .NET developers to build beautiful cross-platform apps, fast.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts\/44260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/users\/879"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/comments?post=44260"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/posts\/44260\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/media\/44262"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/media?parent=44260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/categories?post=44260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/xamarin\/wp-json\/wp\/v2\/tags?post=44260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}