title: Silverlight User Control in MainPage.xaml
body: <p>I'm currently investigating building a User Control in a Silverlight Project in Expression Blend 4. The control has an associated set of sample data for the User Control, and the data is appearing correctly in the User Control.</p>
  
  <p>When I place the User Control on the main page, the sample data does not appear in the User Control. Is this correct behaviour, or am I setting/not setting something? What I am finding odd is that when I edit the User Control, the data appears in the Main Page alongside a Rebuild Indicator (Yellow Exclamation mark). When I rebuild, the data disappears again.</p>
  
  <p>This is the Main Page Code:</p>
  
  <pre><code>&lt;UserControl
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:SilverlightApplication2" mc:Ignorable="d"
  x:Class="SilverlightApplication2.MainPage"
  Width="1200" Height="640"&gt;
  &lt;UserControl.Resources&gt;
      &lt;local:MultiDayViewModel x:Key="MultiDayViewModelDataSource" d:IsDataSource="True"/&gt;
  &lt;/UserControl.Resources&gt;
  
  &lt;Grid x:Name="LayoutRoot" Background="White" d:DataContext="{d:DesignData /SampleData/TestSampleData.xaml}"&gt;
      &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition Height="0.128*"/&gt;
          &lt;RowDefinition Height="0.872*"/&gt;
      &lt;/Grid.RowDefinitions&gt;
      &lt;StackPanel Margin="0,24,8,8" HorizontalAlignment="Right" Width="318" Orientation="Horizontal"&gt;
          &lt;Button Content="Daily"/&gt;
          &lt;Button Content="Weekly"/&gt;
      &lt;/StackPanel&gt;
      &lt;local:MultiDayView x:Name="MultiDayView" Margin="8" Grid.Row="1" DataContext="{Binding Calenar, Source={StaticResource MultiDayViewModelDataSource}}"/&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>
  
  <p>Any thoughts or directions would be appreciated.</p>
  
  <p>Thanks.</p>