Property always default

I have created a Xaml View which has a label on.

<ContentView xmlns="" xmlns:x="" x:Class="DrawShape.AnimatedLabel">
        <Label x:Name="Lbl" Text="{Binding Count, StringFormat='{0:##,###} Steps'}"  />

In the Code behind page I have added a property to use :

        public static readonly BindableProperty EndValueProperty = BindableProperty.Create<AnimatedLabel, int> (s => s.EndValue, 0, BindingMode.TwoWay);

        public int EndValue {
            get{ return (int)GetValue (EndValueProperty); }
            set{ SetValue (EndValueProperty, value); }

In my page, I create a Animated Label and assign a value to the property:

          <controls:AnimatedLabel  EndValue="2500" />

This builds fine, and the label appears on the screen - but when I debug the code the property 'EndValue' is always 0. Why is the value I have assigned to it not been passed through?

Cheers Ash

Sign In or Register to comment.