I want to create a template variable in Xamarin Forms like the ones we can create in Angular.
For example like this
I want to create a template variable in Xamarin Forms like the ones we can create in Angular.
For example like this
You can use x:Name to name a view then refer to it elsewhere using x:Reference. Like the following:
<Slider x:Name="slider"
Maximum="360" />
<Label BindingContext="{x:Reference slider}"
Text="{Binding Value, StringFormat='The angle is {0:F0} degrees'}" />
Here is an article showing this and other binding techniques.