Reputation: 1777
I want to set the value of Entry using Binding. My simple question is that, how may I use the value of C# class variable in XML page through Binding.?
Here is the screenshot of my XML Page
Here is the screenshot of Class File
is it possible in Xamarin.Forms (Portable)?
The simple logic for this requirement is that, in future if I have to change the color or text or anything then I don't have to do to each file and change text.
Upvotes: 0
Views: 2930
Reputation: 89082
You can only bind to public properties.
XAML:
<Entry Color="{Binding EntryColor}" />
C#:
public Color EntryColor { get { return Color.White; } }
Upvotes: 1