UIElement.ManipulationInertiaStarting 이벤트

정의

입력 디바이스에서 조작 중에 UIElement 개체와의 연결이 끊어져 활동이 없게 될 때 발생합니다.

public:
 event EventHandler<System::Windows::Input::ManipulationInertiaStartingEventArgs ^> ^ ManipulationInertiaStarting;
public event EventHandler<System.Windows.Input.ManipulationInertiaStartingEventArgs> ManipulationInertiaStarting;
member this.ManipulationInertiaStarting : EventHandler<System.Windows.Input.ManipulationInertiaStartingEventArgs> 
Public Custom Event ManipulationInertiaStarting As EventHandler(Of ManipulationInertiaStartingEventArgs) 

이벤트 유형

예제

다음 예제와 ManipulationInertiaStarting 이벤트 처리기에 대해 변환, 확장 등 회전 관성 도중 사용 되는 감속을 가져오거나 설정 합니다. 이 예제는에서 더 큰 예제의 일부 연습: 만드는 첫 번째 터치 애플리케이션합니다.

void Window_InertiaStarting(object sender, ManipulationInertiaStartingEventArgs e)
{

    // Decrease the velocity of the Rectangle's movement by 
    // 10 inches per second every second.
    // (10 inches * 96 pixels per inch / 1000ms^2)
    e.TranslationBehavior.DesiredDeceleration = 10.0 * 96.0 / (1000.0 * 1000.0);

    // Decrease the velocity of the Rectangle's resizing by 
    // 0.1 inches per second every second.
    // (0.1 inches * 96 pixels per inch / (1000ms^2)
    e.ExpansionBehavior.DesiredDeceleration = 0.1 * 96 / (1000.0 * 1000.0);

    // Decrease the velocity of the Rectangle's rotation rate by 
    // 2 rotations per second every second.
    // (2 * 360 degrees / (1000ms^2)
    e.RotationBehavior.DesiredDeceleration = 720 / (1000.0 * 1000.0);

    e.Handled = true;
}
Private Sub Window_InertiaStarting(ByVal sender As Object,
                                   ByVal e As ManipulationInertiaStartingEventArgs)

    ' Decrease the velocity of the Rectangle's movement by 
    ' 10 inches per second every second.
    ' (10 inches * 96 pixels per inch / 1000ms^2)
    e.TranslationBehavior.DesiredDeceleration = 10.0 * 96.0 / (1000.0 * 1000.0)

    ' Decrease the velocity of the Rectangle's resizing by 
    ' 0.1 inches per second every second.
    ' (0.1 inches * 96 pixels per inch / (1000ms^2)
    e.ExpansionBehavior.DesiredDeceleration = 0.1 * 96 / (1000.0 * 1000.0)

    ' Decrease the velocity of the Rectangle's rotation rate by 
    ' 2 rotations per second every second.
    ' (2 * 360 degrees / (1000ms^2)
    e.RotationBehavior.DesiredDeceleration = 720 / (1000.0 * 1000.0)

    e.Handled = True
End Sub

설명

ManipulationInertiaStarting 이벤트는 사용자가 조작 중에 화면에서 모든 손가락을 들어 올릴 때 발생합니다. 예를 들어 사용자가 표면을 가로질러 를 "throw" UIElement 하는 경우 사용자는 를 터치 UIElement 하여 작업을 시작하고, 짧은 거리에서 화면을 가로질러 손가락을 이동한 다음, 을 해제합니다 UIElement. 사용자가 요소를 해제하면 관성은 시작되고 ManipulationInertiaStarting 이벤트가 발생합니다. 는 UIElement 요소에서 관성 발생을 나타내는 이벤트를 계속 받 ManipulationDelta 습니다.

이 이벤트를 사용하여 관성의 동작을 지정할 수 있습니다. 예를 들어 관성이 시작될 때 사용되는 초기 속도를 설정할 수 있습니다. 원하는 감속을 설정하거나 원하는 배치를 설정하여 관성의 양을 지정할 수도 있습니다. 각 조작 유형(변환, 확장 또는 회전)에 대해 이러한 값을 독립적으로 설정할 수 있습니다. 자세한 내용은 ManipulationInertiaStartingEventArgs를 참조하세요.

조작에 대 한 자세한 내용은 참조는 입력 개요합니다. 조작에 응답 하는 애플리케이션 예제를 보려면 연습: 만드는 첫 번째 터치 애플리케이션합니다.

라우팅 이벤트 정보

식별자 필드 ManipulationInertiaStartingEvent
라우팅 전략 버블링
대리자 EventHandler<TEventArgs> 형식의 ManipulationInertiaStartingEventArgs입니다.

적용 대상