title: Bindable property return only default value
body: <p>I want create user control (user view) in xamarin.forms. My contol has one property. Control choose what the element would be add to the page (Entry or Label). For it I use BindableProperty, but it return only default value. I dont understand what wrong?</p>
  
  <p>Here my user control code:</p>
  
  <pre><code> public partial class UserView : ContentView
  {
      public UserView()
      {
          InitializeComponent();
          StackLayout stackLayout = new StackLayout();
          if (TypeElement == "label")                              //TypeElement return only "default value"
              stackLayout.Children.Add(new Label { Text = "LABEL" });
          else
              stackLayout.Children.Add(new Entry { Text = "ENTRY" });
  
          Content = stackLayout;
      }
  
      public static readonly BindableProperty TypeProperty = BindableProperty.CreateAttached("TypeElement", typeof(string), typeof(UserView), "default value");
  
      public string TypeElement
      {
          get
          {
              return (string)GetValue(TypeProperty);
          }
          set
          {
              SetValue(TypeProperty, value);
          }
      }
  }
  </code></pre>
  
  <p>Here I use my control on page:</p>
  
  <p><a href="https://i.stack.imgur.com/8COHB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8COHB.png" alt="enter image description here"></a></p>