я определил ресурс следующим образом:XamlReader подбрасывая необъявленную ошибку префикс
<DataTemplate xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid x:Name="grdArticle" Height="190" Width="190" toolkit:TiltEffect.IsTiltEnabled="True">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image Source="samplePhoto.jpg" Grid.Row="0" Stretch="UniformToFill"/>
<Grid Grid.Row="0" Height="55" VerticalAlignment="Bottom">
<Rectangle Grid.Row="0" Fill="{StaticResource PhoneAccentBrush}"/>
<TextBlock Grid.Row="0" Text="{Binding Title}" Canvas.ZIndex="2" VerticalAlignment="Bottom" TextWrapping="Wrap" Margin="5,5,5,5" Height="50" FontStyle="Normal">
<TextBlock.Foreground>
<SolidColorBrush Color="#BFFFFFFF"/>
</TextBlock.Foreground>
</TextBlock>
</Grid>
</Grid>
</DataTemplate>
Когда я пытаюсь разобрать его с помощью:
DataTemplate dtTmplt = XamlReader.Load(PhoneApp5.Resource1.Datatemplate_lst) as DataTemplate;
я получаю XamlParseException, говоря «неопознанный префикс "в строке 2, позиция 104. Я пробовал много тегов xmlns из Интернета, но ничего не работает. Любая помощь?
Большое спасибо. Эта вещь растратила мои 4 часа. –