多点触摸多点触控(MultiTouch)Microsoft Surface控件之ScatterView
今天,我来介绍一下Microsoft Surface当中的控件,ScatterView控件是Microsoft Surface控件中简单的一个,也是很常用的一个。ScatterView Class的命名空间是Microsoft.Surface.Presentation.Controls,这也是Microsoft Surface大部分控件的所在位置,下来介绍一下ScatterView最简单的使用。
ScatterView是包含多用户界元素的控件,用户能够在一个固定区域内自由移动、旋转或调整其大小。一个ScatterView控件中每一个控件都包含在一个ScatterViewItem控件 ,如果不添加它会默认加入的,你是可以同时分别移动、 旋转或缩放ScatterViewItem的每个项目的。下面就做一个使用ScatterView控件最简单的例子:
首先新建Microsoft Surface 2.0的一个项目:
下来写一个简单的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 >
好了,我只在ScatterView控件添加了一些示例图片:
下面我就来运行一下:
好了,每张照片都可以像真实物体那样随意拖动。ScatterView控件就介绍到这里。
更多内容访问: http://flute.vacau.com/
转载时须注明本文的详细链接,否则作者将保留追究其法律责任
Microsoft Surface控件之LibraryContainer
posted @ 2011-08-09 21:13 flute 阅读(260) | 评论 (0) 编辑
Microsoft Surface控件之ScatterView
posted @ 2011-08-09 20:18 flute 阅读(341) | 评论 (0) 编辑
Microsoft Surface触摸真实世界
posted @ 2011-08-03 19:22 flute 阅读(1220) | 评论 (12) 编辑
08 2011 档案
Microsoft Surface控件之LibraryContainer
posted @ 2011-08-09 21:13 flute 阅读(265) | 评论 (0) 编辑
Microsoft Surface控件之ScatterView
posted @ 2011-08-09 20:18 flute 阅读(344) | 评论 (0) 编辑
Microsoft Surface触摸真实世界
posted @ 2011-08-03 19:22 flute 阅读(1222) | 评论 (12) 编辑
Silverlight特色的独立存储区--IsolatedStorage
posted @ 2011-08-02 18:06 flute 阅读(820) | 评论 (8) 编
07 2011 档案
数据结构——四则运算
posted @ 2011-07-30 10:38 flute 阅读(946) | 评论 (2) 编辑
ASP.NET MVC 几种简单的Action介绍
posted @ 2011-07-29 18:53 flute 阅读(409) | 评论 (0) 编辑
类与结构的区别
posted @ 2011-07-29 17:42 flute 阅读(214) | 评论 (0) 编辑
Logo
06 2011 档案
WPF与Win32完成窗口及各个子控件的绘制的对比
posted @ 2011-06-23 22:03 flute 阅读(211) | 评论 (0) 编辑
WPF架构
posted @ 2011-06-15 22:57 flute 阅读(72) | 评论 (0) 编辑
作者: Leo_wl
出处: http://www.cnblogs.com/Leo_wl/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
版权信息查看更多关于多点触摸多点触控(MultiTouch)Microsoft Surface控件之ScatterVie的详细内容...