2014-08-30 205 views
0

我的windows phone 7.5。应用程序正常工作,但升级到Windows Phone 8 o.s.后。我的视觉工作室不能运行我的应用程序,并显示它在mainpage.xaml文件中的错误,像1行 我没有实现任何richtext框我已经实现coading4fun工具包。无法投射System.Reflection.CustomAttributeData类型的对象visual studio 2012 windows phone 8

“无法投型 'System.Reflection.CustomAttributeData' 的对象键入 'System.ComponentModel.TypeConverterAttribute'

我的Visual Studio 2012 Express,用于Windows Phone的8更新4 我该怎么解决。请帮我在此先感谢。

回答

0

我面临同样的问题,当我复制一个已定义<Image>标签贴在同一页上。

所以,以前<Image>标签是

<Image x:Name="imgWallpaperThumbnail" Height="233" Stretch="UniformToFill" Margin="0,10,0,0" Tap="imgWallpaperThumbnail_Tap"> 
          <Image.Source> 
           <BitmapImage UriSource="{Binding ImagePath}" CreateOptions="BackgroundCreation" ></BitmapImage> 
          </Image.Source> 
         </Image> 

,当我复制并粘贴在同一页上,然后它被转换为:

<Image x:Name="imgWallpaperThumbnail_Copy" Height="65" Margin="10,10,395,0" Tap="imgWallpaperThumbnail_Tap"> 
          <Image.Source> 
           <ImageSource>/Assets/Ellipse.png</ImageSource> 
          </Image.Source> 
         </Image> 

现在,查看图片来源,它应该是<BitmapImage>而不是<Image.Source>

我建议你下载Visual Studio Community 2015,Update 3,它提供了详细的例外。

<Image>是一个系统控制和源是它的属性之一,它设置图像。但是,当你应用图像操作时,你应该使用来自System.Windows.Media.Imaging的BitmapImage,它提供了对象源类型,而不是成员System.Windows.Media的控制台<Image>

相关问题