title: Xamarin.Forms Bind Parent Property with Child's in XAML
body: <p>I have search for two days and can't find a answer for this problem. I have a Simple Content Page, with one Bindable Property:</p>
  
  <pre><code>public partial class Page1 : ContentPage
  {
      public static readonly BindableProperty MainTextProperty = BindableProperty.Create&lt;Page1 , string&gt;(p =&gt; p.MainText, string.Empty);
  
      public string MainText
      {
          get
          {
              return (string)GetValue(MainTextProperty);
          }
          set
          {
              SetValue(MainTextProperty, value);
          }
      }
  }
  </code></pre>
  
  <p>In XAML, I have the following code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
           xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
           x:Class="Test.Pages.Page1"&gt;
  &lt;Grid HorizontalOptions="Fill" VerticalOptions="Fill"&gt;
  &lt;Grid.RowDefinitions&gt;
    &lt;RowDefinition Height="*" /&gt;
    &lt;RowDefinition Height="*" /&gt;
    &lt;RowDefinition Height="*" /&gt;
    &lt;RowDefinition Height="*" /&gt;
  &lt;/Grid.RowDefinitions&gt;
  
  &lt;Label Text="{Binding MainText}" Grid.Row="0"/&gt;    
  &lt;Label Text="{Binding MainText}" Grid.Row="1"/&gt;
  &lt;Label Text="{Binding MainText}" Grid.Row="2"/&gt;
  &lt;ctrl:CustomControl CustomProperty="{Binding MainText}" /&gt;
  &lt;Label Text="{Binding MainText}" Grid.Row="3"/&gt;
  &lt;/Grid&gt;
  &lt;/ContentPage&gt;
  </code></pre>
  
  <p>In Custom Control, is something like that:</p>
  
  <pre><code>&lt;StackLayout&gt;
     &lt;Label x:Name="lbl1" /&gt;
  &lt;/StackLayout&gt;
  </code></pre>
  
  <p>And in the code Behind, I use the OnPropertyChanged to set the value received between the CustomProperty and the lbl1. The CustomProperty is defined as the same way as I have defined the MainTextProperty.</p>
  
  <p>However , this is not working. I looked for any kind of example that would allow me doing anything like that, but I have not found. Any of you know how I can accomplish something like that? I'm receiving problems of type mismatch between the value that I pass and Xamarin.Forms.Binding.</p>