Microsoft Surface: Adding IdentityTag to TagVisualizer shows a cross-hair. Why?
in my Surface application happens this: When I put an IdentityTag onto my TagVisualizer, a white cross-hair appears. This TagVisualizer adds no TagVisualization when adding a Tag, it just calls some methods in its "VisualizationAdded"-Event. In my other TagVisualizers before there were no cross-hair but they always had Visualizations added like this in the initialization of the TagVisualizer: tagDef.Source = new Uri("something.xaml", UriKind.Relative);
But how can I ged rid of this cross-hair? I cannot find anything about it. By the way, 开发者_运维问答it looks like this: http://img80.imageshack.us/img80/4728/crosshairc.png
http://img80.imageshack.us/img80/4728/crosshairc.png'/>
I've just run into the same problem because I didn't want a TagVisualization to display when I put a tag down (I wanted some items to be displayed in an already displayed librarystack). I solved it by setting the source of the ByteTagDefinition to null
ByteTagVisualizationDefinition tvBlue = new ByteTagVisualizationDefinition();
tvBlue.Value = 02;
tvBlue.Source = null;
MainTagVisualizer.Definitions.Add(tvBlue);
This gets rid of the crosshair - and I assume will work for IdentityTags, although I have not tried.
the crosshairs are used as the default visualization if you dont specify a custom source. we did this in order to let developers get the layout & configuration working without having to first define the visualization. a crosshair was selected as a default visual because it can be helpful in validating your physical offset properties
-robert (former PM for the Surface controls)
精彩评论