本文整理汇总了C#中Windows.UI.Xaml.Input.ManipulationCompletedRoutedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# ManipulationCompletedRoutedEventArgs类的具体用法?C# ManipulationCompletedRoutedEventArgs怎么用?C# ManipulationCompletedRoutedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ManipulationCompletedRoutedEventArgs类属于Windows.UI.Xaml.Input命名空间,在下文中一共展示了ManipulationCompletedRoutedEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
}
开发者ID:Korshunoved,项目名称:Win10reader,代码行数:26,代码来源:ManipulationListener.cs
示例2: SplitViewOpener_ManipulationCompleted
private void SplitViewOpener_ManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
{
if (e.Cumulative.Translation.X > 50)
{
MySplitView.IsPaneOpen = true;
}
}
开发者ID:TomWalkerCodes,项目名称:HowToBBQ.Win10,代码行数:7,代码来源:Shell.xaml.cs
示例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;
}
开发者ID:islamRaafat,项目名称:dropbox-sdk-dotnet,代码行数:35,代码来源:SwipeManager.cs
示例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();
}
}
开发者ID:tgckpg,项目名称:wenku10,代码行数:29,代码来源:ContentReader-VESwipe.xaml.cs
示例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());
}
}
开发者ID:diagonalwalnut,项目名称:GodTools,代码行数:25,代码来源:slide1.xaml.cs
示例6: Border_ManipulationCompleted
private void Border_ManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
{
translation = 0;
translationFactor = 0;
translationTransform.Y = 0;
timer.Stop();
}
开发者ID:Guzhongren,项目名称:arcgis-runtime-demos-dotnet,代码行数:7,代码来源:JoystickControl.xaml.cs
示例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;
}
开发者ID:ridomin,项目名称:waslibs,代码行数:26,代码来源:SliderView.Manipulation.cs
示例8: Manipulation_Completed
void Manipulation_Completed(object sender, ManipulationCompletedRoutedEventArgs e)
{
endX = e.Position.X;
if (endX < startX)
Frame.Navigate(typeof (GetStarted2));
e.Handled = true;
}
开发者ID:Azure-Samples,项目名称:MyDriving,代码行数:7,代码来源:GetStarted1.xaml.cs
示例9: OnSplitViewPaneManipulationCompleted
private void OnSplitViewPaneManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
{
if (e.Cumulative.Translation.X < -50)
{
SplitViewMenu.IsPaneOpen = false;
}
}
开发者ID:Producenta,项目名称:MyFitness,代码行数:7,代码来源:AppShell.xaml.cs
示例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);
}
}
}
开发者ID:j-hayes,项目名称:Flash-Card-App,代码行数:31,代码来源:StudyFlashCardSetView.xaml.cs
示例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));
}
}
开发者ID:nguyendo94vn,项目名称:MeBe,代码行数:8,代码来源:MainPage.xaml.cs
示例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;
}
开发者ID:psotirov,项目名称:TelerikAcademyProjects,代码行数:8,代码来源:MainPage.xaml.cs
示例13: OnManipulationCompleted
protected override void OnManipulationCompleted(ManipulationCompletedRoutedEventArgs e)
{
base.OnManipulationCompleted(e);
if (Action != null)
{
Action.OnManipulationCompleted(e);
}
}
开发者ID:SuperMap,项目名称:iClient-for-Win8,代码行数:8,代码来源:MapActionPart.cs
示例14: RandomKuva_ManipulationCompleted
public void RandomKuva_ManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
{
if (_transformImage.X > 80 || _transformImage.X < -80)
{
vm.RandomKuva_ManipulationCompleted();
}
_transformImage.X = 0;
}
开发者ID:Joonas-Virtanen,项目名称:IHaveIdeas,代码行数:8,代码来源:Card.xaml.cs
示例15: ToDiaryIfSwipedLeft
public void ToDiaryIfSwipedLeft(object sender, ManipulationCompletedRoutedEventArgs e)
{
var currentPoint = e.Position;
if (_initialPoint.X - currentPoint.X >= Constants.SWIPING_TRESHOLD)
{
NavigateToDiary();
}
}
开发者ID:erooijak,项目名称:MeditationTimer,代码行数:8,代码来源:TimerPage.xaml.cs
示例16: Manipulation_Completed
void Manipulation_Completed(object sender, ManipulationCompletedRoutedEventArgs e)
{
endX = e.Position.X;
if (endX < startX) //forward
Frame.Navigate(typeof (GetStarted5));
else if (endX > startX) //back
Frame.Navigate(typeof (GetStarted3));
e.Handled = true;
}
开发者ID:Azure-Samples,项目名称:MyDriving,代码行数:9,代码来源:GetStarted4.xaml.cs
示例17: SplitViewPane_ManipulationCompleted
private void SplitViewPane_ManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
{
if (e.Cumulative.Translation.X < -40)
{
MySplitView.IsPaneOpen = false;
}
}
开发者ID:BigDaddy1337,项目名称:DocsReader,代码行数:9,代码来源:MainPage.xaml.cs
示例18: OnManipulationCompleted
private void OnManipulationCompleted(object sender,
ManipulationCompletedRoutedEventArgs manipulationCompletedRoutedEventArgs)
{
IsScrolling = false;
if (_numTouchPoints <= 1)
{
ManipulationDelta -= OnDelta;
}
}
开发者ID:philllies,项目名称:finalproject,代码行数:9,代码来源:TwoFingerScrollViewer.cs
示例19: ManipulationCompleted
protected override void ManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
{
double totalManipulation = (e.Position.X + e.Velocities.Linear.X/20);
FlipDirection flipDirection = totalManipulation > DRAG_THRESHOLD
? FlipDirection.Backward
: totalManipulation < -DRAG_THRESHOLD ? FlipDirection.Forward : FlipDirection.Revert;
DoFlip(flipDirection);
}
开发者ID:Korshunoved,项目名称:Win10reader,代码行数:9,代码来源:StaticDragPageManipulation.cs
示例20: ScrollLongDescrition_ManipulationCompleted
private void ScrollLongDescrition_ManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
{
var sc = sender as ScrollViewer;
if (sc.ViewportHeight == sc.ExtentHeight)
GradientText.Visibility = Visibility.Collapsed;
else
GradientText.Visibility = Visibility.Visible;
}
开发者ID:wuchangqi,项目名称:ifixit-microsoft,代码行数:9,代码来源:Device.xaml.cs
注:本文中的Windows.UI.Xaml.Input.ManipulationCompletedRoutedEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论