ByteTagVisualization抛出了ArgumentException

时间:2013-01-25 23:03:44

标签: c# pixelsense argumentexception

我不熟悉在stackoverflow上发布以及在C#中编写Microsoft Surface的新代码 - 但是我继承了别人的代码以适应。

尝试设置ByteTagVisualizationDefinition的源代码时出现以下错误

'markup://1/file:///C:/Users/PJ/Documents/Visual Studio 2010/Projects/Rememo/Rememo/SurfaceWindow1.xaml%230/reminderTags.xaml' is not a valid value for property 'Source'.

at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal) at 

Microsoft.Expression.Platform.WPF.WpfDependencyPropertyImplementation.SetValue(Object target, Object valueToSet) at 
Microsoft.Expression.DesignModel.Metadata.DependencyPropertyReferenceStep.SetValue(Object target, Object valueToSet) at 
Microsoft.Expression.DesignModel.Core.InstanceBuilderOperations.SetValue(Object target, IProperty propertyKey, Object value) at 
Microsoft.Expression.DesignModel.InstanceBuilders.ClrObjectInstanceBuilder.ModifyValue(IInstanceBuilderContext context, ViewNode target, IProperty propertyKey, Object value, PropertyModification modification) at 
Microsoft.Expression.DesignModel.InstanceBuilders.DependencyObjectInstanceBuilderBase`1.ModifyValue(IInstanceBuilderContext context, ViewNode target, IProperty propertyKey, Object value, PropertyModification modification) at 
Microsoft.Expression.DesignModel.InstanceBuilders.ClrObjectInstanceBuilder.UpdateProperty(IInstanceBuilderContext context, ViewNode viewNode, IProperty propertyKey, DocumentNode valueNode)

一起
Error 1 'markup://1/file:///C:/Users/PJ/Documents/Visual Studio 2010/Projects/Rememo/Rememo/SurfaceWindow1.xaml%230/reminderTags.xaml' 
is not a valid value for property 'Source'. C:\Users\PJ\Documents\Visual Studio 2010\Projects\Rememo\Rememo\SurfaceWindow1.xaml 

我尝试访问此源的代码是:

<Grid Background="{StaticResource WindowBackground}">
  <s:TagVisualizer>
      <s:TagVisualizer.Definitions>
         <s:ByteTagVisualizationDefinition Value="0xC0" Source="reminderTags.xaml" />
      </s:TagVisualizer.Definitions>
  </s:TagVisualizer>

当我编译代码并在Surface Simulator上运行它时它运行成功 - 我不知道为什么会出现这个错误?我正在按照微软教程进入这个阶段,现在我有点不知道是什么问题。

0 个答案:

没有答案