Simple binding in XAML

Hash6Hash6 USMember

Hello. I have question about binding in Xamarin. I'm trying to do it the simplest way and I don't know why isn't it working.

<?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="" xmlns:x="" x:Class="MyNamespace.SimplePage"> <Label Text="{Binding MyString}"/> </ContentPage>

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Xamarin.Forms; namespace MyNamespace { public partial class SimplePage : ContentPage { public string MyString { get; set; } public SimplePage () { InitializeComponent(); MyString = "Any text"; } } }

Best Answer


Sign In or Register to comment.