Getting started

Aug 21, 2009 at 2:50 AM

Transferred from a page comment:

BillElagizi wrote:

Thanks a lot for the control.
I am new to MS Surface. I added the namespace and the Surface Control to the XAML of a scatter view project. I added pictures to the scatetr view and the Surface Control. When I run it I get the images (which I can move around using multitouch) and Virtual Earth in a window. I can not move the map using multitouch though. Comments please. Also VE does not zoom in or out. Thanks a lot.


The reason the map doesn't move like the other pictures in the ScatterView is because the map captures your contacts, preventing the ScatterView from seeing the events.  Think about how a user would use it.  Should they touch the map and move their finger to pan the map, or should the map never pan and moving the finger causes the map to move within the Scatterview?  Since panning is a core feature of the map, then you cannot directly move it in a ScatterView.

Instead, consider something like this: (Pseudo-code, untested in a compiler)


<StackPanel Margin="20">

<TextBlock Text="Map" />

<ve:SurfaceMap />



This will put the map inside of some other graphical elements and give you a "handle" to move the map around in the ScatterView.  Users can touch the map to pan, or touch the text label or margins to move the whole setup around.

Sep 30, 2009 at 1:56 PM

Thanks again. That works. I have a new quastion. I am trying to draw on the VE Map. I used the PhotoPaint sample in the Surface SDK. I added the PhotoPaint sample code to your SurfaceVEMapSample. I get the scatter view with the color wheel fine. When I draw, it draws on the scatter view. Is there a way to get it to draw on the VE Map. I do not know how to change the "SurfaceInkCanvas" (in the SDK sample) to include the whole VE Map. Is there another way to do same? Thanks a lot.

Sep 30, 2009 at 2:55 PM

If you put multiple elements inside of a Grid cell, they will overlap.


<ve:SurfaceMap />

<s:SurfaceInkCanvas />


Now in this case, the InkCanvas would capture all of the touch events and prevent the map from reacting.  You would need to toggle on or off whether inking is enabled using a buttom somewhere.  Perhaps you should toggle the IsHitTestVisible property on the ink canvas, or there might be another property better for that.

Dec 1, 2009 at 9:26 PM


iam also new in surface sdk. i am trying to programme some simple moving pictures.

via a grid layout and the help of a surfaceListBox, i set my pictures in the the left(column 0) of the surface and the right one(column 2).

the problem i encouter is  that, how  can i move one picture or more to the centre ? i have no idea to realize this.

i tought of scatterview, but the scatterview that i made move my pictures only in their areas( column 0 or column 2), but i want to drag my pictures to the middle(column 1).

i hope that someone can help me through some suggestions.

Thanks in advance.

Mar 27, 2010 at 4:35 PM

you need to change dynamically the grid.column property to be 1

Nov 30, 2010 at 8:47 AM



I have the opposite problem to BillElagizi, I place a win7TouchVeMap control inside of a ScatterViewItem. When I touch the map it moves the ScatterViewItem and doesn't pan the map. How can I change this behaviour?


Thanks in advance

Jan 13, 2011 at 12:08 AM

beargreaves: Use SurfaceVEMap for Surface SDK 1.0 or WPFTouchVEMap for WPF 4 with Surface Toolkit.

Nov 2, 2011 at 3:34 PM

@joshb: if you have a SurfaceInkCanvas on top of a SurfaceMap and want to have some transformations on the InkCanvas because of touch input: is there no way to do that? If I set IsHitTestVisible to false, but InkMode is none then I get none of the touch inputs? Is there a way to capture the events outside of InkMode and then not have them handled so they can be captured by the Maps Control? I must have missed something but I figured someone here would definitely know!