Silverlight控件 - ScatterView

Silverlight控件 - ScatterView


2009.03.03


简介:

ScatterView是一个布局控件,允许对其内部的子控件进行鼠标拖拽、扔出等操作。
项目地址:http://scatterview.codeplex.com/


使用:

这里下载DLL文件,其中包含两个文件:agTweener.dll 、ScatterView.dll。ScatterView.dll是主文件agTweener.dll 是用来做动画效果的,之前 有对他的介绍。下载了文件后在Silverlight项目中添加引用。

在page.xaml的头部添加代码
 xmlns:ScatterView="clr-namespace:ScatterView;assembly=ScatterView"         

把ScatterView控件放入page中
   <scatterview:scatterview margin="5,5,5,5" horizontalalignment="Stretch" x:name="xScatterView">
         </scatterview:scatterview>

在后台添加子控件
xScatterView.AddChild(UIElement1UIElement2);
这里说明一下,第一个参数是真正要添加的子控件,第二个参数是子控件的阴影,如果没有,用null代替。

Demo:

这里我做了一个使用的小demo,可根据google ID从http://picasaweb.google.com获取相册数据并将获取到的照片缩略图放入ScatterView容器控件中。右下角的GetTarot按钮是内置的一套塔罗牌。
http://www.grmcac.com/silverlight/lab/ScatterView/
demo全部源代码下载:http://scatterview.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=24169

预览:

posted @ 2009-03-03 23:52  王喆(nasa)  阅读(4364)  评论(10编辑  收藏  举报