DataContext="{Binding ...}"
</source>
<br>
'''Xamarin'''
<source lang = "xml">
BindingContext="{Binding ...}"
</source>
<br>
The above attributes can be added to any control to change it's binding context.
<br>
Try this experiment:
Text="{Binding Title}" />
</source>
<br>
By using this code snippet, we expect to see the Title or the current object. However, because we have a context switch applied, we would instead see the Title of the parent object.
{{Attention| For Xamarin use '''Label''' instead of TextBlock and '''BindingContext''' instead of DataContext.}}
[[Category:Pages with broken file links|XAML Best practices]]
[[Category:XAML|XAML Best practices]]
==== ⚠️ Important Note ====