==== ⚠️ Context Switching And Templates ====
<tabs>
<tab name="DataTemplate (Xamarin only)">
As described in the previous section, DataTemplates are designed to be used as templates for data contexts, therefore the content control used to render them, controls:ContentControl, has the TemplateContext property which allows you to set the binding context '''for the template'''. The important difference to note is that the controls:ContentControl itself will not use the TemplateContext, but rather the inherited context from its hosting xaml.
ContentTemplate="{StaticResource MyPropertyTemplate}" />
</source>
</tab>
<tab name="ControlTemplate (Xamarin)">
On the other hand, since the ControlTemplate is not designed to be used this way, it has no inherent binding context attribute that can be assigned to it's content only. To use it this way would therefore require a context switch on the ContentView used to render it, with the related adjustments required to bindings placed on the ContentView itself;
<source lang = "xml">
</source>
{{Hint|CallingViewModel (as used on the IsVisible attribute) can be added to a metaproperty's binding path to bind to its context object.}}
</tab>
<tab name="ControlTemplate (Xamarin)">
No example yet.
</tab>
</tabs>
{{Attention|Remember that Styling in Xaml is type-based, so you cannot use the same template with controls:ContentControl (ContentTemplate attribute) and ContentView (ControlTemplate attribute), as DataTemplate and ControlTemplate are technically different types.}}