{"id":58892,"date":"2022-07-03T08:22:45","date_gmt":"2022-07-03T08:22:45","guid":{"rendered":"https:\/\/www.techwebspace.com\/?p=58892"},"modified":"2022-07-03T08:22:48","modified_gmt":"2022-07-03T08:22:48","slug":"explain-controls-template-in-xamarin-forms","status":"publish","type":"post","link":"https:\/\/www.techwebspace.com\/explain-controls-template-in-xamarin-forms\/","title":{"rendered":"Explain Controls Template in Xamarin Forms"},"content":{"rendered":"\n<p>In Xamarin, the visual structure of ContentPage-derived pages and ContentView-derived custom controls can be defined using Forms control templates. The user interface (UI) for a custom control, or page, is separated from the logic that implements the control or page using control templates. At a pre-defined position, more content can be inserted into the templated custom control or templated page.<\/p>\n\n\n\n<p>For example, to <a href=\"https:\/\/www.ifourtechnolab.com\/blog\/how-to-create-xamarin-forms-behaviors\">create behaviors with Xamarin.Forms<\/a> and seamlessly redefine the UI, a control template with custom control can be developed efficiently. The needed custom control instance can then consume the control template. A control template, on the other hand, can be used to specify any common UI that will be shared by several pages in an application.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Create a Control Template<\/strong><\/h2>\n\n\n\n<p>The code for a CardView custom control is shown in the following example:<\/p>\n\n\n\n<div class=\"wp-block-group is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<pre class=\"wp-block-code\"><code><code>public class CardView : ContentView\n{\n    public static readonly BindableProperty CardTitleProperty = BindableProperty.Create(nameof(CardTitle), typeof(string), typeof(CardView), string.Empty);\n    public static readonly BindableProperty CardDescriptionProperty = BindableProperty.Create(nameof(CardDescription), typeof(string), typeof(CardView), string.Empty);\n    \/\/ ...\n\n    public string CardTitle\n    {\n        get =&gt; (string)GetValue(CardTitleProperty);\n        set =&gt; SetValue(CardTitleProperty, value);\n    }\n\n    public string CardDescription\n    {\n        get =&gt; (string)GetValue(CardDescriptionProperty);\n        set =&gt; SetValue(CardDescriptionProperty, value);\n    }\n    \/\/ ...\n}<\/code><\/code><\/pre>\n<\/div><\/div>\n\n\n\n<p>A custom control that shows data in a card-like arrangement is represented by the CardView class, which inherits from the ContentView class. The data it presents is represented by properties that are backed by bindable properties. The CardView class, on the other hand, does not define any user interface. Instead, a control template will be used to define the user interface. See Xamarin.Forms ContentView for more information on creating Content View-derived custom controls.<br>The ControlTemplate type is used to generate a control template. You use View objects to design the UI for a custom control or page when you create a ControlTemplate. Only one View can be the root element of a ControlTemplate. Other View objects are normally found in the root element. The visual structure of the control is made up of a collection of objects.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/www.techwebspace.com\/wp-content\/uploads\/2022\/07\/Explain-Controls-Template-in-Xamarin-Forms01.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.techwebspace.com\/wp-content\/uploads\/2022\/07\/Explain-Controls-Template-in-Xamarin-Forms01.jpg\" alt=\"\" class=\"wp-image-58895\" width=\"733\" height=\"289\" srcset=\"https:\/\/www.techwebspace.com\/wp-content\/uploads\/2022\/07\/Explain-Controls-Template-in-Xamarin-Forms01.jpg 968w, https:\/\/www.techwebspace.com\/wp-content\/uploads\/2022\/07\/Explain-Controls-Template-in-Xamarin-Forms01-300x118.jpg 300w, https:\/\/www.techwebspace.com\/wp-content\/uploads\/2022\/07\/Explain-Controls-Template-in-Xamarin-Forms01-768x303.jpg 768w\" sizes=\"(max-width: 733px) 100vw, 733px\" \/><\/a><\/figure><\/div>\n\n\n<p><br><br>The ControlTemplate type is used to generate a control template. You use View objects to design the UI for a custom control or page when you create a ControlTemplate. Only one View can be the root element of a ControlTemplate. Other View objects are normally found in the root element. The visual structure of the control is made up of a collection of objects. If you declare a control template in the root element of your application definition XAML file, for example, you can use it everywhere in your app. Only that page can use the control template if you define it in a page. See Xamarin.Forms Resource Dictionaries for additional information about resources.<\/p>\n\n\n\n<div class=\"wp-block-group is-layout-flow\"><div class=\"wp-block-group__inner-container\">\n<pre class=\"wp-block-code\"><code><code>A ControlTemplate for CardView objects is shown in the XAML sample below:\n&lt;ContentPage xmlns=\"http:\/\/xamarin.com\/schemas\/2014\/forms\"\n             xmlns:x=\"http:\/\/schemas.microsoft.com\/winfx\/2009\/xaml\"\n             ...&gt;\n    &lt;ContentPage.Resources&gt;\n      &lt;ControlTemplate x:Key=\"CardViewControlTemplate\"&gt;\n          &lt;Frame BindingContext=\"{Binding Source={RelativeSource TemplatedParent}}\"\n                 BackgroundColor=\"{Binding CardColor}\"\n                 BorderColor=\"{Binding BorderColor}\"\n                 CornerRadius=\"5\"\n                 HasShadow=\"True\"\n                 Padding=\"8\"\n                 HorizontalOptions=\"Center\"\n                 VerticalOptions=\"Center\"&gt;\n              &lt;Grid&gt;\n                  &lt;Grid.RowDefinitions&gt;\n                      &lt;RowDefinition Height=\"75\" \/&gt;\n                      &lt;RowDefinition Height=\"4\" \/&gt;\n                      &lt;RowDefinition Height=\"Auto\" \/&gt;\n                  &lt;\/Grid.RowDefinitions&gt;\n                  &lt;Grid.ColumnDefinitions&gt;\n                      &lt;ColumnDefinition Width=\"75\" \/&gt;\n                      &lt;ColumnDefinition Width=\"200\" \/&gt;\n                  &lt;\/Grid.ColumnDefinitions&gt;\n                  &lt;Frame IsClippedToBounds=\"True\"\n                         BorderColor=\"{Binding BorderColor}\"\n                         BackgroundColor=\"{Binding IconBackgroundColor}\"\n                         CornerRadius=\"38\"\n                         HeightRequest=\"60\"\n                         WidthRequest=\"60\"\n                         HorizontalOptions=\"Center\"\n                         VerticalOptions=\"Center\"&gt;\n                      &lt;Image Source=\"{Binding IconImageSource}\"\n                             Margin=\"-20\"\n                             WidthRequest=\"100\"\n                             HeightRequest=\"100\"\n                             Aspect=\"AspectFill\" \/&gt;\n                  &lt;\/Frame&gt;\n                  &lt;Label Grid.Column=\"1\"\n                         Text=\"{Binding CardTitle}\"\n                         FontAttributes=\"Bold\"\n                         FontSize=\"Large\"\n                         VerticalTextAlignment=\"Center\"\n                         HorizontalTextAlignment=\"Start\" \/&gt;\n                  &lt;BoxView Grid.Row=\"1\"\n                           Grid.ColumnSpan=\"2\"\n                           BackgroundColor=\"{Binding BorderColor}\"\n                           HeightRequest=\"2\"\n                           HorizontalOptions=\"Fill\" \/&gt;\n                  &lt;Label Grid.Row=\"2\"\n                         Grid.ColumnSpan=\"2\"\n                         Text=\"{Binding CardDescription}\"\n                         VerticalTextAlignment=\"Start\"\n                         VerticalOptions=\"Fill\"\n                         HorizontalOptions=\"Fill\" \/&gt;\n              &lt;\/Grid&gt;\n          &lt;\/Frame&gt;\n      &lt;\/ControlTemplate&gt;\n    &lt;\/ContentPage.Resources&gt;\n    ...\n&lt;\/ContentPage&gt;<\/code>\n<\/code><\/pre>\n<\/div><\/div>\n\n\n\n<p>A key must be supplied using the x:Key attribute when a ControlTemplate is declared as a resource so that it can be identified in the resource dictionary. In this case, the CardViewControlTemplate&#8217;s root element is a Frame object. The Frame object uses the RelativeSource markup extension to set its BindingContext to the templated parent, which is the runtime object instance to which the template will be applied. The visual framework of a CardView object is defined by the Frame object, which combines Grid, Frame, Image, Label, and BoxView elements. Because these objects inherit the BindingContext from the root Frame element, their binding expressions resolve to CardView attributes. See Xamarin for more details on the RelativeSource markup extension. Relative Bindings are formed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Consume a Control Template<\/strong><\/h2>\n\n\n\n<p>By setting the ControlTemplate attribute to the control template object, a ControlTemplate can be applied to a Content View-derived custom control. Similarly, by setting the ControlTemplate property of a Content Page-derived page to the control template object, a ControlTemplate can be applied to the page. When a ControlTemplate is applied to a templated custom control or templated page at runtime, all of the controls defined in the ControlTemplate are added to the visual tree of the templated custom control or templated page.<\/p>\n\n\n\n<p>Each CardView object&#8217;s ControlTemplate attribute is allocated the CardViewControlTemplate in the following example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>&lt;ContentPage xmlns=\"http:\/\/xamarin.com\/schemas\/2014\/forms\"\n             xmlns:x=\"http:\/\/schemas.microsoft.com\/winfx\/2009\/xaml\"\n             xmlns:controls=\"clr-namespace:ControlTemplateDemos.Controls\"\n             ...&gt;\n    &lt;StackLayout Margin=\"30\"&gt;\n        &lt;controls:CardView BorderColor=\"DarkGray\"\n                           CardTitle=\"John Doe\"\n                           CardDescription=\"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla elit dolor, convallis non interdum.\"\n                           IconBackgroundColor=\"SlateGray\"\n                           IconImageSource=\"user.png\"\n                           ControlTemplate=\"{StaticResource CardViewControlTemplate}\" \/&gt;\n        &lt;controls:CardView BorderColor=\"DarkGray\"\n                           CardTitle=\"Jane Doe\"\n                           CardDescription=\"Phasellus eu convallis mi. In tempus augue eu dignissim fermentum. Morbi ut lacus vitae eros lacinia.\"\n                           IconBackgroundColor=\"SlateGray\"\n                           IconImageSource=\"user.png\"\n                           ControlTemplate=\"{StaticResource CardViewControlTemplate}\" \/&gt;\n        &lt;controls:CardView BorderColor=\"DarkGray\"\n                           CardTitle=\"Xamarin Monkey\"\n                           CardDescription=\"Aliquam sagittis, odio lacinia fermentum dictum, mi erat scelerisque erat, quis aliquet arcu.\"\n                           IconBackgroundColor=\"SlateGray\"\n                           IconImageSource=\"user.png\"\n                           ControlTemplate=\"{StaticResource CardViewControlTemplate}\" \/&gt;\n    &lt;\/StackLayout&gt;\n&lt;\/ContentPage&gt;<\/code><\/code><\/pre>\n\n\n\n<p>The controls in the CardViewControlTemplate are included in the visual tree for each CardView object in this example. The Frame and its children resolve their binding expressions against the properties of each CardView object since the root Frame object for the control template assigns its BindingContext to the templated parent.<\/p>\n\n\n\n<p>The CardViewControlTemplate is applied to the three CardView objects in the following&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href=\"https:\/\/docs.microsoft.com\/en-us\/xamarin\/xamarin-forms\/app-fundamentals\/templates\/control-template-images\/relativesource-controltemplate-large.png#lightbox\"><\/a><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/www.techwebspace.com\/wp-content\/uploads\/2022\/07\/image.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.techwebspace.com\/wp-content\/uploads\/2022\/07\/image.png\" alt=\"\" class=\"wp-image-58893\" width=\"569\" height=\"313\" srcset=\"https:\/\/www.techwebspace.com\/wp-content\/uploads\/2022\/07\/image.png 790w, https:\/\/www.techwebspace.com\/wp-content\/uploads\/2022\/07\/image-300x165.png 300w, https:\/\/www.techwebspace.com\/wp-content\/uploads\/2022\/07\/image-768x422.png 768w\" sizes=\"(max-width: 569px) 100vw, 569px\" \/><\/a><figcaption>Consume a Control template<\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><strong>Pass Parameter with TemplateBinding<\/strong><\/h2>\n\n\n\n<p>The TemplateBinding markup extension links a public property defined by the templated custom control or templated page to a property of an element in a ControlTemplate. When you utilize a TemplateBinding, you allow the control&#8217;s properties to be used as template parameters. When a property on a templated custom control or templated page is set, the value is sent to the element with the TemplateBinding.<\/p>\n\n\n\n<p>The following XAML example uses the TemplateBinding markup extension to create a ControlTemplate for CardView objects:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>&lt;ContentPage xmlns=\"http:\/\/xamarin.com\/schemas\/2014\/forms\"\n             xmlns:x=\"http:\/\/schemas.microsoft.com\/winfx\/2009\/xaml\"\n             ...&gt;\n    &lt;ContentPage.Resources&gt;\n        &lt;ControlTemplate x:Key=\"CardViewControlTemplate\"&gt;\n            &lt;Frame BackgroundColor=\"{TemplateBinding CardColor}\"\n                   BorderColor=\"{TemplateBinding BorderColor}\"\n                   CornerRadius=\"5\"\n                   HasShadow=\"True\"\n                   Padding=\"8\"\n                   HorizontalOptions=\"Center\"\n                   VerticalOptions=\"Center\"&gt;\n                &lt;Grid&gt;\n                    &lt;Grid.RowDefinitions&gt;\n                        &lt;RowDefinition Height=\"75\" \/&gt;\n                        &lt;RowDefinition Height=\"4\" \/&gt;\n                        &lt;RowDefinition Height=\"Auto\" \/&gt;\n                    &lt;\/Grid.RowDefinitions&gt;\n                    &lt;Grid.ColumnDefinitions&gt;\n                        &lt;ColumnDefinition Width=\"75\" \/&gt;\n                        &lt;ColumnDefinition Width=\"200\" \/&gt;\n                    &lt;\/Grid.ColumnDefinitions&gt;\n                    &lt;Frame IsClippedToBounds=\"True\"\n                           BorderColor=\"{TemplateBinding BorderColor}\"\n                           BackgroundColor=\"{TemplateBinding IconBackgroundColor}\"\n                           CornerRadius=\"38\"\n                           HeightRequest=\"60\"\n                           WidthRequest=\"60\"\n                           HorizontalOptions=\"Center\"\n                           VerticalOptions=\"Center\"&gt;\n                        &lt;Image Source=\"{TemplateBinding IconImageSource}\"\n                               Margin=\"-20\"\n                               WidthRequest=\"100\"\n                               HeightRequest=\"100\"\n                               Aspect=\"AspectFill\" \/&gt;\n                    &lt;\/Frame&gt;\n                    &lt;Label Grid.Column=\"1\"\n                           Text=\"{TemplateBinding CardTitle}\"\n                           FontAttributes=\"Bold\"\n                           FontSize=\"Large\"\n                           VerticalTextAlignment=\"Center\"\n                           HorizontalTextAlignment=\"Start\" \/&gt;\n                    &lt;BoxView Grid.Row=\"1\"\n                             Grid.ColumnSpan=\"2\"\n                             BackgroundColor=\"{TemplateBinding BorderColor}\"\n                             HeightRequest=\"2\"\n                             HorizontalOptions=\"Fill\" \/&gt;\n                    &lt;Label Grid.Row=\"2\"\n                           Grid.ColumnSpan=\"2\"\n                           Text=\"{TemplateBinding CardDescription}\"\n                           VerticalTextAlignment=\"Start\"\n                           VerticalOptions=\"Fill\"\n                           HorizontalOptions=\"Fill\" \/&gt;\n                &lt;\/Grid&gt;\n            &lt;\/Frame&gt;\n        &lt;\/ControlTemplate&gt;\n    &lt;\/ContentPage.Resources&gt;\n    ...\n&lt;\/ContentPage&gt;\n<\/code><\/code><\/pre>\n\n\n\n<p>The TemplateBinding markup extension resolves binding expressions against each CardView object&#8217;s properties in this example. The CardViewControlTemplate is applied to the three CardView objects in the following screenshots:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/www.techwebspace.com\/wp-content\/uploads\/2022\/07\/image-1.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.techwebspace.com\/wp-content\/uploads\/2022\/07\/image-1.png\" alt=\"\" class=\"wp-image-58894\" width=\"409\" height=\"302\" srcset=\"https:\/\/www.techwebspace.com\/wp-content\/uploads\/2022\/07\/image-1.png 625w, https:\/\/www.techwebspace.com\/wp-content\/uploads\/2022\/07\/image-1-300x221.png 300w\" sizes=\"(max-width: 409px) 100vw, 409px\" \/><\/a><figcaption>Passing Parameter with TemplateBinding<\/figcaption><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h3>\n\n\n\n<p>In this blog, we have deeply discussed the concepts of Creating a Control template, consuming a Control template, and Passing Parameters with TemplateBinding. This will help you comprehend the usage of controls in various scenarios.<\/p>\n\n\n\n<p>Technocrat and entrepreneur of a reputed esteemed <a href=\"https:\/\/www.ifourtechnolab.com\/powerpoint-add-in-development-company\">PowerPoint Add-in Development Company<\/a> with years of experience in building large-scale enterprise web, cloud, and mobile applications using the latest technologies like ASP.NET, CORE, .NET MVC, Angular, and Blockchain. Keen interest in addressing business problems using the latest technologies and helping organizations achieve goals.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For example, to create behaviors with Xamarin.Forms and seamlessly redefine the UI, a control template with custom control can be developed efficiently. <\/p>\n","protected":false},"author":9382,"featured_media":37883,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1399,5986,1794,6140,2357,1791,519],"tags":[43,7778,1954,7777],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Explain Controls Template in Xamarin Forms by iFour Technolab<\/title>\n<meta name=\"description\" content=\"In Xamarin, the visual structure of Content Page-derived pages and Content View-derived custom controls can be defined using Forms control templates.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.techwebspace.com\/explain-controls-template-in-xamarin-forms\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Explain Controls Template in Xamarin Forms by iFour Technolab\" \/>\n<meta property=\"og:description\" content=\"In Xamarin, the visual structure of Content Page-derived pages and Content View-derived custom controls can be defined using Forms control templates.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.techwebspace.com\/explain-controls-template-in-xamarin-forms\/\" \/>\n<meta property=\"og:site_name\" content=\"Tech Web Space\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/atechwebspace\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/ifourtechnolab\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-03T08:22:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-03T08:22:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.techwebspace.com\/wp-content\/uploads\/2020\/09\/Web-Developer.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1500\" \/>\n\t<meta property=\"og:image:height\" content=\"838\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Harshal Suthar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@consultifour\" \/>\n<meta name=\"twitter:site\" content=\"@techwebspace\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Harshal Suthar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.techwebspace.com\/explain-controls-template-in-xamarin-forms\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.techwebspace.com\/explain-controls-template-in-xamarin-forms\/\"},\"author\":{\"name\":\"Harshal Suthar\",\"@id\":\"https:\/\/www.techwebspace.com\/#\/schema\/person\/b9d4c9ba6b5739b3321c6b17a798b78f\"},\"headline\":\"Explain Controls Template in Xamarin Forms\",\"datePublished\":\"2022-07-03T08:22:45+00:00\",\"dateModified\":\"2022-07-03T08:22:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.techwebspace.com\/explain-controls-template-in-xamarin-forms\/\"},\"wordCount\":932,\"publisher\":{\"@id\":\"https:\/\/www.techwebspace.com\/#organization\"},\"keywords\":[\"content marketing\",\"Template in Xamarin.Form\",\"xamarin app development\",\"xamarin.Form\"],\"articleSection\":[\"Design &amp; Development\",\"Guest Post\",\"How to\",\"Information Technology\",\"Internet\",\"Tech Education\",\"Tips &amp; Tricks\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.techwebspace.com\/explain-controls-template-in-xamarin-forms\/\",\"url\":\"https:\/\/www.techwebspace.com\/explain-controls-template-in-xamarin-forms\/\",\"name\":\"Explain Controls Template in Xamarin Forms by iFour Technolab\",\"isPartOf\":{\"@id\":\"https:\/\/www.techwebspace.com\/#website\"},\"datePublished\":\"2022-07-03T08:22:45+00:00\",\"dateModified\":\"2022-07-03T08:22:48+00:00\",\"description\":\"In Xamarin, the visual structure of Content Page-derived pages and Content View-derived custom controls can be defined using Forms control templates.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.techwebspace.com\/explain-controls-template-in-xamarin-forms\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.techwebspace.com\/explain-controls-template-in-xamarin-forms\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.techwebspace.com\/explain-controls-template-in-xamarin-forms\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.techwebspace.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Explain Controls Template in Xamarin Forms\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.techwebspace.com\/#website\",\"url\":\"https:\/\/www.techwebspace.com\/\",\"name\":\"Tech Web Space\",\"description\":\"Let\u2019s Make Things Better\",\"publisher\":{\"@id\":\"https:\/\/www.techwebspace.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.techwebspace.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.techwebspace.com\/#organization\",\"name\":\"Tech Web Space\",\"url\":\"https:\/\/www.techwebspace.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.techwebspace.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.techwebspace.com\/wp-content\/uploads\/2021\/04\/cropped-techwebspace-logo3.png\",\"contentUrl\":\"https:\/\/www.techwebspace.com\/wp-content\/uploads\/2021\/04\/cropped-techwebspace-logo3.png\",\"width\":414,\"height\":155,\"caption\":\"Tech Web Space\"},\"image\":{\"@id\":\"https:\/\/www.techwebspace.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/atechwebspace\/\",\"https:\/\/twitter.com\/techwebspace\",\"https:\/\/www.instagram.com\/techwebspace\/\",\"https:\/\/www.pinterest.com\/atechwebspace\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.techwebspace.com\/#\/schema\/person\/b9d4c9ba6b5739b3321c6b17a798b78f\",\"name\":\"Harshal Suthar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.techwebspace.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a0e5fe91e3cd05060a07f14b04f40f19?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a0e5fe91e3cd05060a07f14b04f40f19?s=96&r=g\",\"caption\":\"Harshal Suthar\"},\"description\":\"Tuning an always learning and growth mindset, Harshal Suthar is a dexterous digital marketing professional with years of experience working with digital marketing, PPC, Adwords, social media marketing, and other digital services. https:\/\/www.ifourtechnolab.com\",\"sameAs\":[\"https:\/\/www.ifourtechnolab.com\/\",\"https:\/\/www.facebook.com\/ifourtechnolab\/\",\"https:\/\/in.linkedin.com\/in\/harshal-suthar-seo-digital-marketing\",\"https:\/\/twitter.com\/consultifour\",\"https:\/\/www.youtube.com\/channel\/UCXGOj7M361sk4OoqqcqEs1g\"],\"url\":\"https:\/\/www.techwebspace.com\/author\/i4technolab\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Explain Controls Template in Xamarin Forms by iFour Technolab","description":"In Xamarin, the visual structure of Content Page-derived pages and Content View-derived custom controls can be defined using Forms control templates.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.techwebspace.com\/explain-controls-template-in-xamarin-forms\/","og_locale":"en_US","og_type":"article","og_title":"Explain Controls Template in Xamarin Forms by iFour Technolab","og_description":"In Xamarin, the visual structure of Content Page-derived pages and Content View-derived custom controls can be defined using Forms control templates.","og_url":"https:\/\/www.techwebspace.com\/explain-controls-template-in-xamarin-forms\/","og_site_name":"Tech Web Space","article_publisher":"https:\/\/www.facebook.com\/atechwebspace\/","article_author":"https:\/\/www.facebook.com\/ifourtechnolab\/","article_published_time":"2022-07-03T08:22:45+00:00","article_modified_time":"2022-07-03T08:22:48+00:00","og_image":[{"width":"1500","height":"838","url":"https:\/\/www.techwebspace.com\/wp-content\/uploads\/2020\/09\/Web-Developer.jpg","type":"image\/jpeg"}],"author":"Harshal Suthar","twitter_card":"summary_large_image","twitter_creator":"@consultifour","twitter_site":"@techwebspace","twitter_misc":{"Written by":"Harshal Suthar","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.techwebspace.com\/explain-controls-template-in-xamarin-forms\/#article","isPartOf":{"@id":"https:\/\/www.techwebspace.com\/explain-controls-template-in-xamarin-forms\/"},"author":{"name":"Harshal Suthar","@id":"https:\/\/www.techwebspace.com\/#\/schema\/person\/b9d4c9ba6b5739b3321c6b17a798b78f"},"headline":"Explain Controls Template in Xamarin Forms","datePublished":"2022-07-03T08:22:45+00:00","dateModified":"2022-07-03T08:22:48+00:00","mainEntityOfPage":{"@id":"https:\/\/www.techwebspace.com\/explain-controls-template-in-xamarin-forms\/"},"wordCount":932,"publisher":{"@id":"https:\/\/www.techwebspace.com\/#organization"},"keywords":["content marketing","Template in Xamarin.Form","xamarin app development","xamarin.Form"],"articleSection":["Design &amp; Development","Guest Post","How to","Information Technology","Internet","Tech Education","Tips &amp; Tricks"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.techwebspace.com\/explain-controls-template-in-xamarin-forms\/","url":"https:\/\/www.techwebspace.com\/explain-controls-template-in-xamarin-forms\/","name":"Explain Controls Template in Xamarin Forms by iFour Technolab","isPartOf":{"@id":"https:\/\/www.techwebspace.com\/#website"},"datePublished":"2022-07-03T08:22:45+00:00","dateModified":"2022-07-03T08:22:48+00:00","description":"In Xamarin, the visual structure of Content Page-derived pages and Content View-derived custom controls can be defined using Forms control templates.","breadcrumb":{"@id":"https:\/\/www.techwebspace.com\/explain-controls-template-in-xamarin-forms\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.techwebspace.com\/explain-controls-template-in-xamarin-forms\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.techwebspace.com\/explain-controls-template-in-xamarin-forms\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.techwebspace.com\/"},{"@type":"ListItem","position":2,"name":"Explain Controls Template in Xamarin Forms"}]},{"@type":"WebSite","@id":"https:\/\/www.techwebspace.com\/#website","url":"https:\/\/www.techwebspace.com\/","name":"Tech Web Space","description":"Let\u2019s Make Things Better","publisher":{"@id":"https:\/\/www.techwebspace.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.techwebspace.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.techwebspace.com\/#organization","name":"Tech Web Space","url":"https:\/\/www.techwebspace.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.techwebspace.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.techwebspace.com\/wp-content\/uploads\/2021\/04\/cropped-techwebspace-logo3.png","contentUrl":"https:\/\/www.techwebspace.com\/wp-content\/uploads\/2021\/04\/cropped-techwebspace-logo3.png","width":414,"height":155,"caption":"Tech Web Space"},"image":{"@id":"https:\/\/www.techwebspace.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/atechwebspace\/","https:\/\/twitter.com\/techwebspace","https:\/\/www.instagram.com\/techwebspace\/","https:\/\/www.pinterest.com\/atechwebspace\/"]},{"@type":"Person","@id":"https:\/\/www.techwebspace.com\/#\/schema\/person\/b9d4c9ba6b5739b3321c6b17a798b78f","name":"Harshal Suthar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.techwebspace.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a0e5fe91e3cd05060a07f14b04f40f19?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a0e5fe91e3cd05060a07f14b04f40f19?s=96&r=g","caption":"Harshal Suthar"},"description":"Tuning an always learning and growth mindset, Harshal Suthar is a dexterous digital marketing professional with years of experience working with digital marketing, PPC, Adwords, social media marketing, and other digital services. https:\/\/www.ifourtechnolab.com","sameAs":["https:\/\/www.ifourtechnolab.com\/","https:\/\/www.facebook.com\/ifourtechnolab\/","https:\/\/in.linkedin.com\/in\/harshal-suthar-seo-digital-marketing","https:\/\/twitter.com\/consultifour","https:\/\/www.youtube.com\/channel\/UCXGOj7M361sk4OoqqcqEs1g"],"url":"https:\/\/www.techwebspace.com\/author\/i4technolab\/"}]}},"_links":{"self":[{"href":"https:\/\/www.techwebspace.com\/wp-json\/wp\/v2\/posts\/58892"}],"collection":[{"href":"https:\/\/www.techwebspace.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techwebspace.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techwebspace.com\/wp-json\/wp\/v2\/users\/9382"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techwebspace.com\/wp-json\/wp\/v2\/comments?post=58892"}],"version-history":[{"count":4,"href":"https:\/\/www.techwebspace.com\/wp-json\/wp\/v2\/posts\/58892\/revisions"}],"predecessor-version":[{"id":58931,"href":"https:\/\/www.techwebspace.com\/wp-json\/wp\/v2\/posts\/58892\/revisions\/58931"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techwebspace.com\/wp-json\/wp\/v2\/media\/37883"}],"wp:attachment":[{"href":"https:\/\/www.techwebspace.com\/wp-json\/wp\/v2\/media?parent=58892"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techwebspace.com\/wp-json\/wp\/v2\/categories?post=58892"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techwebspace.com\/wp-json\/wp\/v2\/tags?post=58892"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}