Thursday, April 30, 2009

ScatterView in Microsoft Surface SDK

Microsoft SDK provides a control named ScatterView which acts like a container and we can move,resize or rotate the object which is placed inside the ScatterView Container.There is no need to create events or code for doing this.ScatterView will automatically handle all the Events.Definitely users will find this as a very cool feature.I created my first Surface application with ScatterView.Its pretty simple doing this and of course cool.

  • Create a Surface Project from Visual Studio Template.
  • Add ScatterView Control.

ScatterView contains collection of ScatterViewItem.Add Objects to ScatterView either inside a ScatterViewItem or we can directly add objects to the ScatterView.

The ScatterView looks either like,

<s:ScatterViewItem Width="200" Height="200" Center="500,300"
Orientation="315" >
<Image Source="Images/Forest.jpg" Stretch="Fill"></Image>

OR like,

<Image Source="Images/Forest.jpg" Stretch="Fill"></Image>

I am adding an Image to the ScatterView so that we can manipulate like resize,rotate or move the image.


Post a Comment