コード例 #1
0
 private void OnFlickBottom(object sender, FlickGestureEventArgs e)
 {
     if (e.Direction == System.Windows.Controls.Orientation.Horizontal)
     {
         // User flicked towards left
         if (e.HorizontalVelocity < 0)
         {
             FlickMessage.Send(DrumbleApp.Shared.Messages.Enums.FlickMessageReason.FlickedLeft, "BottomList");
         }
         // User flicked towards right
         else if (e.HorizontalVelocity > 0)
         {
             FlickMessage.Send(DrumbleApp.Shared.Messages.Enums.FlickMessageReason.FlickedRight, "BottomList");
         }
     }
     else if (e.Direction == System.Windows.Controls.Orientation.Vertical)
     {
         // User flicked towards top
         if (e.VerticalVelocity < 0)
         {
             FlickMessage.Send(DrumbleApp.Shared.Messages.Enums.FlickMessageReason.FlickedUp, "BottomList");
         }
         // User flicked towards bottom
         else if (e.VerticalVelocity > 0)
         {
             FlickMessage.Send(DrumbleApp.Shared.Messages.Enums.FlickMessageReason.FlickedDown, "BottomList");
         }
     }
 }
コード例 #2
0
 private void OnHeaderFlick(object sender, FlickGestureEventArgs e)
 {
     if (e.Direction == System.Windows.Controls.Orientation.Vertical)
     {
         // User flicked towards top
         if (e.VerticalVelocity < 0)
         {
             FlickMessage.Send(DrumbleApp.Shared.Messages.Enums.FlickMessageReason.FlickedUp, "MapToggle");
         }
         // User flicked towards bottom
         else if (e.VerticalVelocity > 0)
         {
             FlickMessage.Send(DrumbleApp.Shared.Messages.Enums.FlickMessageReason.FlickedDown, "MapToggle");
         }
     }
 }