TranslateTransform 클래스

정의

2차원 x-y 좌표계의 개체를 변환(이동)합니다.

public ref class TranslateTransform sealed : Transform
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class TranslateTransform final : Transform
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class TranslateTransform final : Transform
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class TranslateTransform : Transform
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class TranslateTransform : Transform
Public NotInheritable Class TranslateTransform
Inherits Transform
<TranslateTransform .../>
상속
Object Platform::Object IInspectable DependencyObject GeneralTransform Transform TranslateTransform
특성

Windows 요구 사항

디바이스 패밀리
Windows 10 (10.0.10240.0에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v1.0에서 도입되었습니다.)

예제

이 예제에서는 TranslateTransform을 사용하여 텍스트를 오프셋합니다. 이 예에서 기본 텍스트 아래 약간 오프셋된 텍스트 사본이 그림자 효과를 만듭니다.

<Canvas>

    <!-- Offset the text using a TranslateTransform. -->
    <TextBlock FontFamily="Verdana"
               FontSize="32"
               FontWeight="Bold" 
               Foreground="Black"
               Text="Translated Text">
        <TextBlock.RenderTransform>
            <TranslateTransform X="2" Y="2" />
        </TextBlock.RenderTransform>
    </TextBlock>

    <TextBlock FontFamily="Verdana"
               FontSize="32"
               FontWeight="Bold" 
               Foreground="Coral"
               Text="Translated Text"/>

</Canvas>
<Canvas Width="200" Height="200">
    <Rectangle PointerPressed="Rectangle_PointerPressed" 
               Width="50" Height="50" 
               Fill="RoyalBlue">
        <Rectangle.RenderTransform>
            <!-- If you give the transform a name 
                 you can access it easily from code. -->
            <TranslateTransform x:Name="myTranslateTransform" />
        </Rectangle.RenderTransform>
    </Rectangle>
</Canvas>
private void Rectangle_PointerPressed(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
{
    // Increase the X and Y properties.
    myTranslateTransform.X = myTranslateTransform.X + 15;
    myTranslateTransform.Y = myTranslateTransform.Y + 15;
}

생성자

TranslateTransform()

TranslateTransform 클래스의 새 instance 초기화합니다.

속성

Dispatcher

이 개체가 연결된 CoreDispatcher 를 가져옵니다. CoreDispatcher는 코드가 비 UI 스레드에서 시작된 경우에도 UI 스레드에서 DependencyObject에 액세스할 수 있는 기능을 나타냅니다.

(다음에서 상속됨 DependencyObject)
Inverse

가능한 경우 이 GeneralTransform의 역 변환을 가져옵니다.

(다음에서 상속됨 GeneralTransform)
InverseCore

파생 또는 사용자 지정 GeneralTransform에서 Inverse의 반환 값에 대한 동작을 구현합니다.

(다음에서 상속됨 GeneralTransform)
X

X-축을 따라 변환할 거리를 가져오거나 설정합니다.

XProperty

X 종속성 속성을 식별합니다.

Y

y-축을 따라 개체를 변환(이동)할 거리를 가져오거나 설정합니다.

YProperty

Y 종속성 속성을 식별합니다.

메서드

ClearValue(DependencyProperty)

종속성 속성의 로컬 값을 지웁니다.

(다음에서 상속됨 DependencyObject)
GetAnimationBaseValue(DependencyProperty)

애니메이션이 활성화되지 않은 경우 적용되는 종속성 속성에 대해 설정된 모든 기본 값을 반환합니다.

(다음에서 상속됨 DependencyObject)
GetValue(DependencyProperty)

DependencyObject에서 종속성 속성의 현재 유효 값을 반환합니다.

(다음에서 상속됨 DependencyObject)
ReadLocalValue(DependencyProperty)

로컬 값이 설정된 경우 종속성 속성의 로컬 값을 반환합니다.

(다음에서 상속됨 DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

DependencyObject instance 특정 DependencyProperty의 변경 내용을 수신 대기하기 위한 알림 함수를 등록합니다.

(다음에서 상속됨 DependencyObject)
SetValue(DependencyProperty, Object)

DependencyObject에서 종속성 속성의 로컬 값을 설정합니다.

(다음에서 상속됨 DependencyObject)
TransformBounds(Rect)

지정한 경계 상자를 변환한 다음 해당 경계 상자를 포함할 수 있는 크기의 축에 맞춰진 경계 상자를 반환합니다.

(다음에서 상속됨 GeneralTransform)
TransformBoundsCore(Rect)

파생된 변환 클래스에서 TransformBounds 동작을 재정의하는 수단을 제공합니다.

(다음에서 상속됨 GeneralTransform)
TransformPoint(Point)

이 변환 개체의 논리를 사용하여 지정된 지점을 변환하고 결과를 반환합니다.

(다음에서 상속됨 GeneralTransform)
TryTransform(Point, Point)

지정한 점의 변환을 시도한 후 변환의 성공 여부를 나타내는 값을 반환합니다.

(다음에서 상속됨 GeneralTransform)
TryTransformCore(Point, Point)

파생 변환 클래스에서 TryTransform 동작을 재정의하는 수단을 제공합니다.

(다음에서 상속됨 GeneralTransform)
UnregisterPropertyChangedCallback(DependencyProperty, Int64)

RegisterPropertyChangedCallback을 호출하여 이전에 등록된 변경 알림을 취소합니다.

(다음에서 상속됨 DependencyObject)

적용 대상

추가 정보