title: XAML error: "The property 'VisualTree' is set more than once"
body: <p>I'm trying to put two Grids in a DataTemplate.</p>
  
  <p>I'm getting the following error with my code shown below.</p>
  
  <blockquote>
    <p>Error: "The property 'VisualTree' is set more than once"</p>
  </blockquote>
  
  <pre><code>&lt;DataTemplate x:Key="PareoItemTemplate"&gt;
      &lt;Grid x:Name="gridColorEjercicio" Height="100" Width="350" Background="#FFF0F0F0" Margin="-11,0,0,0"&gt;
          &lt;StackPanel Margin="0" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center"&gt;
              &lt;StackPanel Margin="0,10,15,0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"&gt;
                  &lt;TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="{Binding letter}" FontSize="24" FontFamily="Resources/Fonts/Programa Tutorias Bold.ttf#Programa Tutorias" Foreground="Black" VerticalAlignment="Center"/&gt;
                  &lt;TextBlock TextWrapping="Wrap" Text="{Binding option}" FontSize="24" FontFamily="Resources/Fonts/Programa Tutorias Bold.ttf#Programa Tutorias" Width="253" Foreground="Black" HorizontalAlignment="Center" VerticalAlignment="Center"/&gt;
              &lt;/StackPanel&gt;
              &lt;Grid VerticalAlignment="Center" Margin="5,10,5,0" HorizontalAlignment="Center"&gt;
                  &lt;Image Source="{Binding imageURI}" /&gt;
              &lt;/Grid&gt;
          &lt;/StackPanel&gt;
      &lt;/Grid&gt;
      &lt;Grid x:Name="gridPareoColorEjercicio" Height="100" Width="350" Background="#FFF0F0F0" Margin="-11,0,0,0"&gt;
          &lt;StackPanel Margin="0" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center"&gt;
              &lt;StackPanel Margin="0,10,15,0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"&gt;
                  &lt;TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="{Binding letter}" FontSize="24" FontFamily="Resources/Fonts/Programa Tutorias Bold.ttf#Programa Tutorias" Foreground="Black" VerticalAlignment="Center"/&gt;
                  &lt;TextBlock TextWrapping="Wrap" Text="{Binding option}" FontSize="24" FontFamily="Resources/Fonts/Programa Tutorias Bold.ttf#Programa Tutorias" Width="253" Foreground="Black" HorizontalAlignment="Center" VerticalAlignment="Center"/&gt;
              &lt;/StackPanel&gt;
              &lt;Grid VerticalAlignment="Center" Margin="5,10,5,0" HorizontalAlignment="Center"&gt;
                  &lt;Image Source="{Binding imageURI}" /&gt;
              &lt;/Grid&gt;
          &lt;/StackPanel&gt;
      &lt;/Grid&gt;
  &lt;/DataTemplate&gt;
  </code></pre>