PhysicsMagnetBehavior does not remove

May 16, 2011 at 12:47 AM

Hi,

I am trying to use the MagnetBehavior but having issues when I remove from the board.

 

void sprite_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
        {
          Level1s.Children.Remove(sender as UserControl);
             ((PhysicsSprite)sender).ManipulationCompleted -= sprite_ManipulationCompleted;
            _physicsController.DeletePhysicsObject(((PhysicsSprite)sender).Name);
          
        }

When I remove the magnet and drap another control that still have a Magnet I get a behavior like th magnet is still there but not on the screen.
Anyone know how to remove magnet clean?