本文整理汇总了C#中Windows.UI.Xaml.Input.ManipulationCompletedRoutedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# ManipulationCompletedRoutedEventArgs类的具体用法?C# ManipulationCompletedRoutedEventArgs怎么用?C# ManipulationCompletedRoutedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ManipulationCompletedRoutedEventArgs类属于Windows.UI.Xaml.Input命名空间,在下文中一共展示了ManipulationCompletedRoutedEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnManipulationCompleted
private void OnManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
{
Debug.WriteLine("OnManipulationCompleted");
if (_completed)
return;
try
{
if (!_deltaDetected && (DateTime.Now - _startTime).TotalSeconds < 0.5)
{
// if (!_tapHandled)
// this.InvokeTapEvent();
}
else
{
EventHandler<ManipulationCompletedRoutedEventArgs> eventHandler = Completed;
if (eventHandler == null)
return;
eventHandler(sender, e);
}
}
finally
{
_completed = true;
}
}
示例2: SplitViewOpener_ManipulationCompleted
private void SplitViewOpener_ManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
{
if (e.Cumulative.Translation.X > 50)
{
MySplitView.IsPaneOpen = true;
}
}
示例3: OnManipulationCompleted
/// <summary>
/// Called when a manipulation is complete.
/// </summary>
/// <remarks>
/// If the manipulation isn't more than half the object width, then the position is reset,
/// otherwise the direction is picked and the animation switched forward or backwards by a
/// frame, the underlying objects are updated to complete the illusion.
/// </remarks>
/// <param name="sender">The sender.</param>
/// <param name="args">The <see cref="ManipulationCompletedRoutedEventArgs"/> instance containing the event data.</param>
private void OnManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs args)
{
var from = args.Cumulative.Translation.X;
var absX = Math.Abs(args.Cumulative.Translation.X);
if (absX < this.Root.ActualWidth / 2)
{
// no transition, just animate back from the current location.
}
else if (args.Cumulative.Translation.X > 0)
{
// swiping right - move to previous
from -= this.Root.ActualWidth;
this.ImageSet.MoveToPreviousImage();
}
else
{
// swiping left - move to next
from += this.Root.ActualWidth;
this.ImageSet.MoveToNextImage();
}
this.AnimateToZero(from);
args.Handled = true;
}
示例4: VEManipulationEndX
private void VEManipulationEndX( object sender, ManipulationCompletedRoutedEventArgs e )
{
double dv = e.Cumulative.Translation.X.Clamp( MinVT, MaxVT );
ContentAway?.Stop();
if ( VT < dv )
{
ContentAway = new Storyboard();
SimpleStory.DoubleAnimation(
ContentAway, CGTransform, "TranslateX"
, CGTransform.TranslateX
, MainSplitView.ActualWidth );
ContentBeginAwayX( false );
}
else if ( dv < -VT )
{
ContentAway = new Storyboard();
SimpleStory.DoubleAnimation(
ContentAway, CGTransform, "TranslateX"
, CGTransform.TranslateX
, -MainSplitView.ActualWidth );
ContentBeginAwayX( true );
}
else
{
ContentRestore.Begin();
}
}
示例5: EndSwipe
private void EndSwipe(object sender, ManipulationCompletedRoutedEventArgs e)
{
endPosition = e.Position.X;
verticalEndPosition = e.Position.Y;
if ((startPosition > endPosition) && ((startPosition - endPosition) > 40))
{
Frame.Navigate(typeof(slide2));
}
if ((startPosition < endPosition) && ((endPosition - startPosition) > 40))
{
Frame.GoBack();
}
if ((verticalStartPosition > verticalEndPosition) && ((verticalStartPosition - verticalEndPosition) > 40))
{
//Parallel Translation
swipeTranslation(ApplicationData.Current.RoamingSettings.Values["parallel"].ToString());
}
if ((verticalStartPosition < verticalEndPosition) && ((verticalEndPosition - verticalStartPosition) > 40))
{
//Primary Translation
swipeTranslation(ApplicationData.Current.RoamingSettings.Values["primary"].ToString());
}
}
示例6: Border_ManipulationCompleted
private void Border_ManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
{
translation = 0;
translationFactor = 0;
translationTransform.Y = 0;
timer.Stop();
}
示例7: OnManipulationCompleted
private void OnManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
{
if (_direction > 0 && this.Position >= 0)
{
e.Handled = true;
return;
}
if (_direction < 0 && this.Position <= -(this.ItemWidth * _panel.ItemsCount - this.ActualWidth))
{
e.Handled = true;
return;
}
if (_direction > 0)
{
_panel.TranslateDeltaX(0.01);
AnimatePrev();
}
else
{
_panel.TranslateDeltaX(-0.01);
AnimateNext();
}
e.Handled = true;
}
示例8: Manipulation_Completed
void Manipulation_Completed(object sender, ManipulationCompletedRoutedEventArgs e)
{
endX = e.Position.X;
if (endX < startX)
Frame.Navigate(typeof (GetStarted2));
e.Handled = true;
}
示例9: OnSplitViewPaneManipulationCompleted
private void OnSplitViewPaneManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
{
if (e.Cumulative.Translation.X < -50)
{
SplitViewMenu.IsPaneOpen = false;
}
}
示例10: CenterGrid_ManipulateCompleted
private void CenterGrid_ManipulateCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
{
double deltaX = TouchDownX - e.Position.X;
double deltaY = TouchDownY - e.Position.Y;
double absX = Math.Abs(TouchDownX - e.Position.X);
double absY = Math.Abs(TouchDownY - e.Position.Y);
if (absX > absY) //left or right
{
if (deltaX > 0 & deltaX > 12) //right
{
((StudyFlashCardSetViewModel) ViewModel).FlipCardRightCommand.Execute(null);
}
else if (deltaX < -12) //left
{
((StudyFlashCardSetViewModel) ViewModel).FlipCardLeftCommand.Execute(null);
}
}
else // up or down
{
if (deltaY> 0 & deltaY > 12) //up
{
((StudyFlashCardSetViewModel) ViewModel).CorrectNextCardCommand.Execute(null);
}
else if (deltaY < -12) //down
{
((StudyFlashCardSetViewModel) ViewModel).IncorrectNextCardCommand.Execute(null);
}
}
}
示例11: GridLayout_ManipulationCompleted
private void GridLayout_ManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
{
var velocity = e.Velocities;
if (velocity.Linear.Y - velocity.Linear.X > 0.4)
{
this.Frame.Navigate(typeof(Views.Menu));
}
}
示例12: Colors_ManipulationCompleted
private void Colors_ManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
{
var angle = rotateColors.Angle;
angle += (e.Cumulative.Rotation > 0) ? 90 : 270;
angle = angle % 360;
rotateColors.Angle = angle;
Colors.RenderTransform = rotateColors;
}
示例13: OnManipulationCompleted
protected override void OnManipulationCompleted(ManipulationCompletedRoutedEventArgs e)
{
base.OnManipulationCompleted(e);
if (Action != null)
{
Action.OnManipulationCompleted(e);
}
}
示例14: RandomKuva_ManipulationCompleted
public void RandomKuva_ManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
{
if (_transformImage.X > 80 || _transformImage.X < -80)
{
vm.RandomKuva_ManipulationCompleted();
}
_transformImage.X = 0;
}
示例15: ToDiaryIfSwipedLeft
public void ToDiaryIfSwipedLeft(object sender, ManipulationCompletedRoutedEventArgs e)
{
var currentPoint = e.Position;
if (_initialPoint.X - currentPoint.X >= Constants.SWIPING_TRESHOLD)
{
NavigateToDiary();
}
}