This XAML compiles and runs without any runtime errors:
<Window
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:Custom="http://schemas.microsoft.com/wpf/2008/toolkit" x:Class="WpfApplication1.Window1"
Title="Window1" Height="300" Width="300" mc:Ignorable="d">
<StackPanel Orientation="Vertical" d:LayoutOverrides="Height" DataContext="{Binding Source={StaticResource booksDataSource}}">
<Custom:DataGrid ItemsSource="{Binding Mode=Default, XPath=/catalog/book}" AutoGenerateColumns="False">
<Custom:DataGrid.Resources>
<ControlTemplate x:Key="TemplateLoverBirds">
<StackPanel Orientation="Horizontal">
<TextBlock Text="Great book!" />
<TextBlock x:Name="textBlock" Text="{Binding Mode=Default, XPath=title}" />
</StackPanel>
</ControlTemplate>
</Custom:DataGrid.Resources>
<Custom:DataGrid.Columns>
<Custom:DataGridTextColumn Binding="{Binding Mode=Default, XPath=author}"/>
<Custom:DataGridTemplateColumn>
<Custom:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Control x:Name="TitleControl">
<Control.Template>
<ControlTemplate TargetType="{x:Type Control}">
<TextBlock Text="{Binding Mode=Default, XPath=title}" />
</ControlTemplate>
</Control.Template>
</Control>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding XPath=title}" Value="Lover Birds">
<Setter TargetName="TitleControl" Property="Template" Value="{StaticResource TemplateLoverBirds}" />
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</Custom:DataGridTemplateColumn.CellTemplate>
</Custom:DataGridTemplateColumn>
</Custom:DataGrid.Columns>
</Custom:DataGrid>
</StackPanel>
</Window>
But at design time in Blend this is marked as invalid XAML---and in Visual Studio design time the "Load Cancelled" screen shows (but loads properly after clicking Resume loading the designer).