本文整理汇总了C#中Windows.UI.Xaml.Input.ManipulationDeltaRoutedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# ManipulationDeltaRoutedEventArgs类的具体用法?C# ManipulationDeltaRoutedEventArgs怎么用?C# ManipulationDeltaRoutedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ManipulationDeltaRoutedEventArgs类属于Windows.UI.Xaml.Input命名空间,在下文中一共展示了ManipulationDeltaRoutedEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OnManipulationDelta
private void OnManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e)
{
if (_panel.ItemsFitContent)
{
return;
}
double deltaX = e.Delta.Translation.X;
if (e.IsInertial)
{
e.Complete();
}
else
{
if (Math.Abs(e.Cumulative.Translation.X) >= this.ItemWidthEx)
{
e.Complete();
}
else
{
_headerContainer.TranslateDeltaX(deltaX);
_panelContainer.TranslateDeltaX(deltaX);
if (Math.Sign(deltaX) > 0)
{
_tabsContainer.TranslateDeltaX(deltaX * _tabs.PrevTabWidth / this.ItemWidthEx);
}
else
{
_tabsContainer.TranslateDeltaX(deltaX * _tabs.SelectedTabWidth / this.ItemWidthEx);
}
}
}
e.Handled = true;
}
开发者ID:ridomin,项目名称:waslibs,代码行数:35,代码来源:Pivorama.Manipulation.cs
示例2: DeltaImageManipulation
private void DeltaImageManipulation(object sender, ManipulationDeltaRoutedEventArgs e)
{
Image block = (Image)sender;
_thickness.Left = block.Margin.Left + e.Delta.Translation.X;
_thickness.Top = block.Margin.Top + e.Delta.Translation.Y;
block.Margin = _thickness;
}
开发者ID:housemeow,项目名称:OurSecrets,代码行数:7,代码来源:MainPage.xaml.cs
示例3: if
private void rect觸控測試區_ManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e)
{
Debug.WriteLine("ManipulationDelta");
if (e.Cumulative.Translation.X > 150)
{
Refresh手勢操作結果("向右滑動");
e.Handled = true;
}
else if (e.Cumulative.Translation.X < -150)
{
Refresh手勢操作結果("向左滑動");
e.Handled = true;
}
else if (e.Cumulative.Translation.Y > 150)
{
Refresh手勢操作結果("向下滑動");
e.Handled = true;
}
else if (e.Cumulative.Translation.Y < -150)
{
Refresh手勢操作結果("向上滑動");
e.Handled = true;
}
}
开发者ID:vulcanlee,项目名称:Windows8Lab,代码行数:25,代码来源:MainPage.xaml.cs
示例4: theCanvas_ManipulationDelta
private void theCanvas_ManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e)
{
if (isInInertion)
{
return;
}
var top = Canvas.GetTop(this.rect);
var left = Canvas.GetLeft(this.rect);
top += e.Delta.Translation.Y;
left += e.Delta.Translation.X;
var scale = e.Delta.Scale;
//var oldWidth = this.rect.Width;
//var oldHeight = this.rect.Height;
//this.rect.Width *= scale;
//this.rect.Height *= scale;
//top -= (this.rect.Height - oldHeight) / 2;
//left -= (this.rect.Width - oldWidth) / 2;
Canvas.SetTop(this.rect, top);
Canvas.SetLeft(this.rect, left);
var transform = this.rect.RenderTransform as CompositeTransform;
//transform.ScaleX += e.Delta.Scale / 100;
//transform.ScaleY += e.Delta.Scale / 100;
transform.CenterX = this.rect.Width / 2;
transform.CenterY = this.rect.Height / 2;
transform.Rotation += e.Delta.Rotation;
//transform.Angle += e.Delta.Rotation;
}
开发者ID:TelerikAcademy,项目名称:Windows-Applications,代码行数:35,代码来源:MainPage.xaml.cs
示例5: CaptureOnManipulationDelta
private void CaptureOnManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs args)
{
//Not inertia
if (args.IsInertial)
{
return;
}
var zoom = ViewModel.Zoom;
if (zoom != null && zoom.Supported)
{
double max = args.Cumulative.Translation.Y;
double halfHeight = Window.Current.Bounds.Height / 8;
double delta = - (max / halfHeight);
float value = currentZoom + Convert.ToInt32(delta) * 0.5f;
if (value >= zoom.Min && value <= zoom.Max)
{
zoom.Value = value;
}
}
}
开发者ID:Ontropix,项目名称:slow-camera,代码行数:26,代码来源:VideoRecorderView.xaml.cs
示例6: OnManipulationDelta
private void OnManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e)
{
if (e.PointerDeviceType != PointerDeviceType.Mouse)
{
TransformMap(e.Position, e.Delta.Translation, e.Delta.Rotation, e.Delta.Scale);
}
}
开发者ID:bhanu475,项目名称:XamlMapControl,代码行数:7,代码来源:Map.WinRT.cs
示例7: ItemLayer_ManipulationDelta
private void ItemLayer_ManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e)
{
if (e.Cumulative.Translation.X != 0.0)
{
Grid itemlayer = (Grid)sender;
var transform = (CompositeTransform)itemlayer.RenderTransform;
User user = ((FrameworkElement)e.OriginalSource).DataContext as User;
if (user == null) return;
// Reveals Call
if (e.Cumulative.Translation.X < -16 && Math.Abs(e.Cumulative.Translation.X) <= 128)
{
transform.TranslateX = e.Cumulative.Translation.X;
}
// Reveals Email
if (e.Cumulative.Translation.X > 16 && e.Cumulative.Translation.X <= 128)
{
transform.TranslateX = e.Cumulative.Translation.X;
}
e.Handled = true;
}
else
{
e.Handled = false;
}
}
开发者ID:thomasrunner,项目名称:SlackUsersList_Windows,代码行数:34,代码来源:UsersListView.xaml.cs
示例8: OnManipulationDelta
private void OnManipulationDelta(object Sender, ManipulationDeltaRoutedEventArgs DeltaRoutedEventArgs)
{
if (DeltaRoutedEventArgs.IsInertial)
{
if (_manipulationStartPoint.X - DeltaRoutedEventArgs.Position.X > 200)
{
_gameGrid.HandleMove(MoveDirection.Left);
DeltaRoutedEventArgs.Complete();
DeltaRoutedEventArgs.Handled = true;
}
else if (DeltaRoutedEventArgs.Position.X - _manipulationStartPoint.X > 200)
{
_gameGrid.HandleMove(MoveDirection.Right);
DeltaRoutedEventArgs.Complete();
DeltaRoutedEventArgs.Handled = true;
}
else if (_manipulationStartPoint.Y - DeltaRoutedEventArgs.Position.Y > 200)
{
_gameGrid.HandleMove(MoveDirection.Up);
DeltaRoutedEventArgs.Complete();
DeltaRoutedEventArgs.Handled = true;
}
else if (DeltaRoutedEventArgs.Position.Y - _manipulationStartPoint.Y > 200)
{
_gameGrid.HandleMove(MoveDirection.Down);
DeltaRoutedEventArgs.Complete();
DeltaRoutedEventArgs.Handled = true;
}
}
}
开发者ID:andrecurvello,项目名称:2048,代码行数:30,代码来源:MainPage.xaml.cs
示例9: OnPageManipulationDelta
private void OnPageManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e)
{
var delta = e.Delta;
var translationDelta = delta.Translation;
this.ViewModel.MovePlayer(translationDelta.Y);
}
开发者ID:luiseduardohdbackup,项目名称:Windows-Universal,代码行数:7,代码来源:MainPage.xaml.cs
示例10: circlePanel_ManipulationDelta
private void circlePanel_ManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e)
{
rotateTransform.CenterX = circlePanel.X;
rotateTransform.CenterY = circlePanel.Y;
storyboard.Begin();
e.Complete();
}
开发者ID:x01673,项目名称:BCMeng_Project,代码行数:8,代码来源:wheel.xaml.cs
示例11: Grid_ManipulationDelta
private void Grid_ManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e)
{
k.Rotate(-e.Delta.Rotation/180.0 * Math.PI);
k.Translate(e.Delta.Translation);
if(e.Delta.Scale>0)
k.Scale(e.Delta.Scale);
G.Background = new SolidColorBrush(Colors.AliceBlue);
}
开发者ID:MohammedAbuissa,项目名称:KarakibLab,代码行数:8,代码来源:Gesture.xaml.cs
示例12: RightHandle_ManipulationDelta
private void RightHandle_ManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e)
{
var t = (sender as Grid).RenderTransform as CompositeTransform;
var x = (LeftHandle.RenderTransform as CompositeTransform).TranslateX;
var f = x + this.Size * .5;
var c = this.Range;
t.TranslateX = Translate(t, e, f, c);
RightHandleText.Text = Text(t.TranslateX);
}
开发者ID:noriike,项目名称:xaml-106136,代码行数:9,代码来源:MainPage.xaml.cs
示例13: Ellipse_ManipulationDelta
private void Ellipse_ManipulationDelta(object sender,
ManipulationDeltaRoutedEventArgs e)
{
var elli = sender as Ellipse;
var delta = e.Delta;
this.ScaleEllipse(elli, delta);
this.RotateEllipse(elli, delta);
this.TranslateEllipse(elli, delta);
}
开发者ID:luiseduardohdbackup,项目名称:Windows-Universal,代码行数:9,代码来源:MainPage.xaml.cs
示例14: Translate
private double Translate(CompositeTransform s, ManipulationDeltaRoutedEventArgs e, double floor, double ceiling)
{
var target = s.TranslateX + e.Delta.Translation.X;
if (target < floor)
return floor;
if (target > ceiling)
return ceiling;
return target;
}
开发者ID:noriike,项目名称:xaml-106136,代码行数:9,代码来源:MainPage.xaml.cs
示例15: OnAdornManipulationDelta
private async void OnAdornManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e)
{
double delta = e.Delta.Translation.Y;
await TranslateDelta(delta);
if (_cancelManipulation)
{
e.Complete();
}
}
开发者ID:ridomin,项目名称:waslibs,代码行数:9,代码来源:HtmlViewer.Gestures.cs
示例16: CameraImage_ManipulationDelta
private void CameraImage_ManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e)
{
this.CameraImageCompositeTransform.TranslateX += e.Delta.Translation.X;
this.CameraImageCompositeTransform.TranslateY += e.Delta.Translation.Y;
this.CameraContentClipCompositeTransform.TranslateX += e.Delta.Translation.X;
this.CameraContentClipCompositeTransform.TranslateY += e.Delta.Translation.Y;
this.Render();
e.Handled = true;
}
开发者ID:Cologler,项目名称:HentaiCamera,代码行数:9,代码来源:MainPage.xaml.cs
示例17: OnManipulationDelta
protected override void OnManipulationDelta(ManipulationDeltaRoutedEventArgs e)
{
base.OnManipulationDelta(e);
if (Action != null)
{
Action.OnManipulationDelta(e);
}
}
开发者ID:SuperMap,项目名称:iClient-for-Win8,代码行数:9,代码来源:MapActionPart.cs
示例18: Rectangle_ManipulationDelta
private void Rectangle_ManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e)
{
if (e.Delta.Scale > 0)
{
rectangleScaleTransform.ScaleX = rectangleScaleTransform.ScaleX * e.Delta.Scale;
rectangleScaleTransform.ScaleY = rectangleScaleTransform.ScaleY * e.Delta.Scale;
}
//rectangleTranslateTransform.X += e.Delta.Translation.X;
//rectangleTranslateTransform.Y += e.Delta.Translation.Y;
}
开发者ID:745322878,项目名称:Code,代码行数:10,代码来源:MainPage.xaml.cs
示例19: MonitorManipulationDelta
void MonitorManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e)
{
if (Movement != null)
Movement(this, new MovementMonitorEventArgs {
X = _xOffsetStartValue + e.Cumulative.Translation.X,
Y = _yOffsetStartValue + e.Cumulative.Translation.Y
});
e.Handled = true;
}
开发者ID:selaromdotnet,项目名称:Coding4FunToolkit,代码行数:10,代码来源:MovementMonitor.cs
示例20: RootManipulationDelta
private void RootManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e)
{
DxPanel.Pitch = NormalizeAngle(
DxPanel.Pitch + e.Delta.Translation.Y * 0.005);
DxPanel.Yaw = NormalizeAngle(
DxPanel.Yaw + e.Delta.Translation.X * 0.005);
DxPanel.Scale *= e.Delta.Scale;
}
开发者ID:teichgraf,项目名称:Adc15Demos,代码行数:10,代码来源:MainPage.xaml.cs
注:本文中的Windows.UI.Xaml.Input.ManipulationDeltaRoutedEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论