2

私は次のコードを持っていますが、それは機能していません。誰かがそれを機能させるために私がする必要がある変更を私に提案することができます。

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");
        }
4

1 に答える 1

0

次の行を置き換えます。

Mainscroll.ManipulationCompleted += 
    new EventHandler<System.Windows.Input.ManipulationCompletedEventArgs>(Mainscroll_completed);

この行で:

this.Mainscroll.AddHandler(
    Pivot.ManipulationCompletedEvent, 
    new EventHandler<ManipulationCompletedEventArgs>(Mainscroll_completed), true);

そして削除します:

target.AddHandler(UIElement.ManipulationCompletedEvent......
于 2014-12-02T13:27:35.680 に答える