Today, I will introduce the control in Microsoft Surface. scatterview is a simple and common control in Microsoft Surface. The namespace of scatterview class is Microsoft. Surface. Presentation. controls, which is also the location of most Microsoft Surface controls. Next, we will introduce the simplest use of scatterview.
Scatterview is a control that contains multi-user elements. You can freely move, rotate, or adjust its size in a fixed area. Each control in a scatterview control is included in a scatterviewitem control. If it is not added, it is added by default. You can move, rotate, or scale each project of scatterviewitem at the same time. The following is a simple example of using the scatterview control:
First, create a project for Microsoft Surface 2.0:
Write a simple XAML code:
< S: surfacewindow X: Class = "Demo. surfacewindow1"
Xmlns = "Http://schemas.microsoft.com/winfx/2006/xaml/presentation"
Xmlns: x = "Http://schemas.microsoft.com/winfx/2006/xaml"
Xmlns: S = "Http://schemas.microsoft.com/surface/2008"
Title = "Demo"
>
< Grid >
< S: scatterview Horizontalalignment = "Stretch" Name = "Scatterview1" Verticalalignment = "Stretch" >
< Image Height = "150" Horizontalalignment = "Left" Name = "Image1" Stretch = "Fill" Verticalalignment = "TOP" Width = "200" Source = "/Demo; component/images/chrysanthemum.jpg" />
< Image Height = "150" Horizontalalignment = "Left" Name = "Image2" Stretch = "Fill" Verticalalignment = "TOP" Width = "200" Source = "/Demo; component/images/desert.jpg" />
< Image Height = "150" Horizontalalignment = "Left" Name = "Image3" Stretch = "Fill" Verticalalignment = "TOP" Width = "200" Source = "/Demo; component/images/hydrangeas.jpg" />
< Image Height = "150" Horizontalalignment = "Left" Name = "Image4" Stretch = "Fill" Verticalalignment = "TOP" Width = "200" Source = "/Demo; component/images/jellyfish.jpg" />
< Image Height = "150" Horizontalalignment = "Left" Name = "Image5" Stretch = "Fill" Verticalalignment = "TOP" Width = "200" Source = "/Demo; component/images/koala.jpg" />
< Image Height = "150" Horizontalalignment = "Left" Name = "Image6" Stretch = "Fill" Verticalalignment = "TOP" Width = "200" Source = "/Demo; component/images/lighthouse.jpg" />
< Image Height = "150" Horizontalalignment = "Left" Name = "Image7" Stretch = "Fill" Verticalalignment = "TOP" Width = "200" Source = "/Demo; component/images/penguins.jpg" />
< Image Height = "150" Horizontalalignment = "Left" Name = "Image8" Stretch = "Fill" Verticalalignment = "TOP" Width = "200" Source = "/Demo; component/images/tulips.jpg" />
</ S: scatterview >
</ Grid >
</ S: surfacewindow >
Now, I only added some sample images in the scatterview control:
Next I will run it:
All right, each photo can be dragged as freely as a real object. The scatterview control is described here.
More access: http://flute.vacau.com/
The detailed link of this article must be noted during reprinting; otherwise, the author will be held legally liable.