sofri
sofri

Reputation: 295

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'/>

Upvotes: 2

Views: 285

Answers (2)

Robert Levy
Robert Levy

Reputation: 29073

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)

Upvotes: 1

jackbot
jackbot

Reputation: 3021

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.

Upvotes: 1

Related Questions