xaml页面
cs页面
public partial class Thumb : PhoneApplicationPage
{
public Thumb()
{
InitializeComponent();
}
//移动中
private void thumb1_DragDelta(object sender, System.Windows.Controls.Primitives.DragDeltaEventArgs e)
{
this.PageTitle.Text = string.Format("x:{0},y:{1}",e.HorizontalChange,e.VerticalChange);
}
//开始
private void thumb1_DragStarted(object sender, System.Windows.Controls.Primitives.DragStartedEventArgs e)
{
this.PageTitle.Text = "started";
}
//完成
private void thumb1_DragCompleted(object sender, System.Windows.Controls.Primitives.DragCompletedEventArgs e)
{
this.PageTitle.Text = "completed";
}
}
------------------------------------------------------------------------------
这是第二个应用
xmal
cs:
//移动中
private void thumb1_DragDelta(object sender, System.Windows.Controls.Primitives.DragDeltaEventArgs e)
{
// this.PageTitle.Text = string.Format("x:{0},y:{1}",e.HorizontalChange,e.VerticalChange);
tr.X = tr.X + e.HorizontalChange;
tr.Y = tr.Y + e.VerticalChange;
}
开始事件 和完成事件 和上面一样了,这个就是thumb可以随意拖动