An ArgumentException was thrown on ByteTagVisualization

I'm new to posting on stackoverflow and new to coding for Microsoft Surface in C # - however I inherited the code for someone else.

I am getting the following error when trying to set source for 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)

      

Along with

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 

      

The code I have is trying to access this source:

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

      

When I compile the code and run it on Surface Simulator it succeeds - I have no idea why this error is showing? I followed Microsoft's tutorial to get to this stage and now I am a bit lost on what is wrong.

+3


source to share





All Articles