title: View to View data binding between a ContentPage and ContentView
body: <p>View to View data binding between a ContentPage and ContentView</p>
  
  <p>I'm using the PlaneRotationDemoPage sample from the Xamarin Forms Book <a href="https://download.xamarin.com/developer/xamarin-forms-book/XamarinFormsBook-Ch21-Apr2016.pdf" rel="nofollow noreferrer">https://download.xamarin.com/developer/xamarin-forms-book/XamarinFormsBook-Ch21-Apr2016.pdf</a></p>
  
  <p>I have a ContentPage and want to move a Slider control from the ContentPage into a ContentView that is in a different XAML/CS file. The content view itself seems to be referenced correctly, however the Slider control binding doesn't seem to be wired correctly. I get an error "Can't resolve name on Element"</p>
  
  <pre><code>&lt;ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
           xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
           xmlns:local="clr-namespace:PlaneRotationDemo;assembly=PlaneRotationDemo"
           x:Class="PlaneRotationDemo.PlaneRotationDemoPage" &gt;
  ...
  
  &lt;local:RoundedBoxView x:Name="handA"
          StrokeThickness="2"
          CornerRadius = "40"
          Stroke = "White"
          Color = "Gray"
          AbsoluteLayout.LayoutBounds = "152.0,248.0,15.0,15.0"
      /&gt;
  
  ...
  
  &lt;local:SliderTest /&gt; //new ContentView
  
  
  //Moving just the slider below into a ContentView   
  &lt;!--    
  &lt;Slider x:Name="rotationSlider"  
          AbsoluteLayout.LayoutBounds = "0,0,200,50"
          Maximum="360"
          Value="{Binding Source={x:Reference Name=handA},
          Path=Rotation}"
          /&gt;--&gt;
  
  //the label below on the ContentPage should bind with the slider that was moved to the ContentView
  
  &lt;Label Text="{Binding Source={x:Reference rotationSlider},
      Path=Value,
      StringFormat='Rotation = {0:F0}'}"
      HorizontalTextAlignment="Center"
      /&gt;
  </code></pre>
  
  <p>In the ContentView file...</p>
  
  <pre><code>&lt;ContentView xmlns="http://xamarin.com/schemas/2014/forms" 
      xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
      x:Class="PlaneRotationDemo.SliderTest"&gt;
  &lt;ContentView.Content&gt;
  
  //slider moved here
  &lt;Slider x:Name="rotationSlider"
          Maximum="360"
          Value="{Binding Source={x:Reference Name=handA}, //should bind with handA in the ContentPage
          Path=Rotation}"
          /&gt;
  
  &lt;/ContentView.Content&gt;
  </code></pre>
  
  <p></p>
  
  <p>The label in the ContentPage needs to reference the slider that is now in the ContentView</p>
  
  <p>The Slider that is now in the ContentView needs to reference the handA RoundedBoxView that is in the ContentPage</p>
  
  <p>Is this possible in XAML? </p>