Silverlight ScatterView相關使用規范
Silverlight開發工具的應用幫助開發人員實現了許多多媒體應用功能。在這里我們會為大家詳細介紹一下其中應用比較廣泛的Silverlight ScatterView控件的使用方法。Silverlight ScatterView是一個布局控件,允許對其內部的子控件進行鼠標拖拽、扔出等操作。#t#
Silverlight ScatterView使用:
在這里下載DLL文件,其中包含兩個文件:agTweener.dll 、ScatterView.dll。ScatterView.dll是主文件agTweener.dll 是用來做動畫效果的,之前 有對他的介紹。下載了文件后在Silverlight項目中添加引用。
在page.xaml的頭部添加代碼
- xmlns:ScatterView="clr-namespace:
ScatterView;assembly=ScatterView"
把Silverlight ScatterView放入page中
- < scatterview:scatterview margin
5,5,5,5" horizontalalignment=
"Stretch" x:name="xScatterView">- < /scatterview:scatterview>
在后臺添加子控件
- xScatterView.AddChild(UIElement1, UIElement2);
這里說明一下,Silverlight ScatterView中的第一個參數是真正要添加的子控件,第二個參數是子控件的陰影,如果沒有,用null代替。