Вы должны установить свойство ManipulationMode в «System, TranslateX», чтобы ваш ListViewItem мог перемещаться только по горизонтали. После этого слушайте эти события: ManipulationStarted, ManipulationDelta и ManipulationCompleted. Я рекомендую использовать эту структуру:
<ListView.ItemTemplate>
<DataTemplate>
<Canvas>
<Grid></Grid> //the grid will have your content and can be moved
</Canvas>
</DataTemplate>
<ListView.ItemTemplate>
В ManipulationStarted, вы получите расстояние, которое пользователь наотмашь с пальцем и переместите сетку в Canvas. Что-то вроде этого:
private void GridManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e)
{
var grid = sender as Grid;
if (grid != null)
{
var distance = Canvas.GetLeft(grid) + e.Delta.Translation.X;
//here you should test if the user has swiped too far(outside the screen), and prevent that
Canvas.SetLeft(grid, distance); //set the grid to the new position inside the canvas
}
}
Я надеюсь, что это помогает. Если у вас есть еще вопросы, пожалуйста, дайте мне знать.