2
我有下面的代碼,但它不工作任何人都可以告訴我需要做什麼變化才能使它工作。如何在Windows Phone 8中處理ManipulationCompleted事件?
Mainscroll.ManipulationCompleted += new EventHandler<System.Windows.Input.ManipulationCompletedEventArgs>(Mainscroll_completed);
private void Mainscroll_completed(object sender, System.Windows.Input.ManipulationCompletedEventArgs e)
{
UIElement target = sender as UIElement;
target.AddHandler(UIElement.ManipulationCompletedEvent, new EventHandler(layoutroot), true);
// throw new NotImplementedException();
}
private void layoutroot(object sender, EventArgs e)
{
MessageBox.Show("done");
}
它是完全不清楚什麼是你想達到的,什麼是不加工。你爲什麼要調用'target.AddHandler ...'? – Haspemulator 2013-02-20 11:24:48
當我們滾動時,我想在滾動結束時處理事件。我想知道當我到達滾動結尾時處理哪個滾動事件,以便我可以處理Scollviewer的ManipulationCompleted事件。我正在使用這些代碼的Windows 8手機,我已經在網絡閱讀,如果ManipulationCompleted不起作用,那麼我們必須使用target.Addhandler。 – Thomas 2013-02-20 11:38:06