Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    TouchEventArgs Class

    Namespace: Stride.UI
    Assembly: Stride.UI.dll

    Provides data for touch input events.

    System.Object → System.EventArgs → RoutedEventArgs → TouchEventArgs
    Derived from TouchEventArgs:

    public class TouchEventArgs : RoutedEventArgs
    Name Description
    Properties
    Action

    Gets the action that occurred.

    ScreenPosition

    Gets the position of the touch on the screen. Position is normalized between [0,1]. (0,0) is the left top corner, (1,1) is the right bottom corner.

    ScreenTranslation

    Gets the translation of the touch on the screen since last triggered event (in normalized units). (1,1) represent a translation of the top left corner to the bottom right corner.

    Timestamp

    Gets the time when this event occurred.

    WorldPosition

    Gets the position of the touch in the UI virtual world space.

    WorldTranslation

    Gets the translation of the touch in the UI virtual world space.

    | Improve this Doc View Source

    Properties


    Action

    Gets the action that occurred.

    public TouchAction Action { get; }
    Property Value
    Type Description
    TouchAction

    ScreenPosition

    Gets the position of the touch on the screen. Position is normalized between [0,1]. (0,0) is the left top corner, (1,1) is the right bottom corner.

    public Vector2 ScreenPosition { get; }
    Property Value
    Type Description
    Vector2

    ScreenTranslation

    Gets the translation of the touch on the screen since last triggered event (in normalized units). (1,1) represent a translation of the top left corner to the bottom right corner.

    public Vector2 ScreenTranslation { get; }
    Property Value
    Type Description
    Vector2

    Timestamp

    Gets the time when this event occurred.

    public TimeSpan Timestamp { get; }
    Property Value
    Type Description
    System.TimeSpan

    WorldPosition

    Gets the position of the touch in the UI virtual world space.

    public Vector3 WorldPosition { get; }
    Property Value
    Type Description
    Vector3

    WorldTranslation

    Gets the translation of the touch in the UI virtual world space.

    public Vector3 WorldTranslation { get; }
    Property Value
    Type Description
    Vector3

    Inherited Members

    RoutedEventArgs.Handled
    RoutedEventArgs.IsBeingRouted
    RoutedEventArgs.RoutedEvent
    RoutedEventArgs.Source
    System.EventArgs.Empty

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation