Print Page | Close Window

XAML Error

Printed From: Codejock Forums
Category: General
Forum Name: XAML Snippets
Forum Description: Post your XAML snippets here for everyone to enjoy :)
URL: http://forum.codejock.com/forum_posts.asp?TID=17751
Printed Date: 16 May 2024 at 9:02am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: XAML Error
Posted By: hartlbb
Subject: XAML Error
Date Posted: 05 January 2011 at 1:11pm
HI All - I was creating a silverlight sketchflow app and suddenly it would not longer build.  It gets to the following line and states "The speciified value cannot be assigned to the collection.  The following type was expected:  "UIElement".  (It breaks on the "Grid" tag at the very bottom)
 
<UserControl
 xmlns=" http://schemas.microsoft.com/winfx/2006/xaml/presentation - http://schemas.microsoft.com/winfx/2006/xaml/presentation "
 xmlns:x=" http://schemas.microsoft.com/winfx/2006/xaml - http://schemas.microsoft.com/winfx/2006/xaml "
 xmlns:d=" http://schemas.microsoft.com/expression/blend/2008 - http://schemas.microsoft.com/expression/blend/2008 "
 xmlns:mc=" http://schemas.openxmlformats.org/markup-compatibility/2006 - http://schemas.openxmlformats.org/markup-compatibility/2006 "
 xmlns:sdk=" http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk - http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk "
 xmlns:i=" http://schemas.microsoft.com/expression/2010/interactivity - http://schemas.microsoft.com/expression/2010/interactivity " xmlns:pi=" http://schemas.microsoft.com/prototyping/2010/interactivity - http://schemas.microsoft.com/prototyping/2010/interactivity "
 mc:Ignorable="d"
 x:Class="WorkOrderTool_SilScreens.Screen_1"
 Width="800" Height="600">
 <UserControl.Resources>
  <ResourceDictionary>
   <ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="ProjectDataSources.xaml"/>
   </ResourceDictionary.MergedDictionaries>
   <DataTemplate x:Key="ItemTemplate">
    <StackPanel>
     <TextBlock Text="{Binding KeyPartID}" Style="{StaticResource BasicTextBlock-Sketch}"/>
    </StackPanel>
   </DataTemplate>
   <DataTemplate x:Key="ItemTemplate1">
    <StackPanel>
     <TextBlock Text="{Binding PKPN}" Style="{StaticResource BasicTextBlock-Sketch}"/>
    </StackPanel>
   </DataTemplate>
   <DataTemplate x:Key="ItemTemplate2">
    <StackPanel>
     <TextBlock Text="{Binding PKPN}" Style="{StaticResource BasicTextBlock-Sketch}"/>
    </StackPanel>
   </DataTemplate>
   <DataTemplate x:Key="ItemTemplate3">
    <StackPanel>
     <TextBlock Text="{Binding PKPN}" Style="{StaticResource BasicTextBlock-Sketch}"/>
    </StackPanel>
   </DataTemplate>
  </ResourceDictionary>
 </UserControl.Resources>
 <Grid x:Name="LayoutRoot" Background="White" DataContext="{Binding Source={StaticResource PKPN_Data}}">



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net