UIElement.IsManipulationEnabled 속성

정의

UIElement 요소에서 조작 이벤트가 사용되는지 여부를 나타내는 값을 가져오거나 설정합니다.

public:
 property bool IsManipulationEnabled { bool get(); void set(bool value); };
public bool IsManipulationEnabled { get; set; }
member this.IsManipulationEnabled : bool with get, set
Public Property IsManipulationEnabled As Boolean

속성 값

UIElement에서 조작 이벤트가 사용되면 true이고, 그렇지 않으면 false입니다. 기본값은 false입니다.

예제

다음 예제에서는 빨간색 사각형에는 애플리케이션을 만듭니다. IsManipulationEnabled 사각형의 속성이 true이 고 애플리케이션의 창 구독 하는 ManipulationStarting, ManipulationDelta, 및 ManipulationInertiaStarting 이벤트입니다. 이 예제는에서 더 큰 예제의 일부 연습: 만드는 첫 번째 터치 애플리케이션합니다.

<Window x:Class="BasicManipulation.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Move, Size, and Rotate the Square"
        WindowState="Maximized"
        ManipulationStarting="Window_ManipulationStarting"
        ManipulationDelta="Window_ManipulationDelta"
        ManipulationInertiaStarting="Window_InertiaStarting">
  <Window.Resources>

    <!--The movement, rotation, and size of the Rectangle is 
        specified by its RenderTransform.-->
    <MatrixTransform x:Key="InitialMatrixTransform">
      <MatrixTransform.Matrix>
        <Matrix OffsetX="200" OffsetY="200"/>
      </MatrixTransform.Matrix>
    </MatrixTransform>

  </Window.Resources>

  <Canvas>
    <Rectangle Fill="Red" Name="manRect"
                 Width="200" Height="200" 
                 RenderTransform="{StaticResource InitialMatrixTransform}"
                 IsManipulationEnabled="true" />
  </Canvas>
</Window>

설명

, , , ManipulationBoundaryFeedbackManipulationStartedManipulationInertiaStartingManipulationDelta, 및 ManipulationCompleted 이벤트를 수신ManipulationStarting하려면 UIElement 이 속성을 true로 설정합니다. 조작에 대 한 자세한 내용은 참조는 입력 개요합니다. 조작에 응답 하는 애플리케이션 예제를 보려면 연습: 만드는 첫 번째 터치 애플리케이션합니다.

적용 대상