Udostępnij za pośrednictwem


View.TranslationX Property

Definition

The horizontal location of this view relative to its #getLeft() left position. -or- Sets the horizontal location of this view relative to its #getLeft() left position.

public virtual float TranslationX { [Android.Runtime.Register("getTranslationX", "()F", "GetGetTranslationXHandler")] get; [Android.Runtime.Register("setTranslationX", "(F)V", "GetSetTranslationX_FHandler")] set; }
[<get: Android.Runtime.Register("getTranslationX", "()F", "GetGetTranslationXHandler")>]
[<set: Android.Runtime.Register("setTranslationX", "(F)V", "GetSetTranslationX_FHandler")>]
member this.TranslationX : single with get, set

Property Value

The horizontal position of this view relative to its left position, in pixels.

Attributes

Remarks

Property getter documentation:

The horizontal location of this view relative to its #getLeft() left position. This position is post-layout, in addition to wherever the object's layout placed it.

Java documentation for android.view.View.getTranslationX().

Property setter documentation:

Sets the horizontal location of this view relative to its #getLeft() left position. This effectively positions the object post-layout, in addition to wherever the object's layout placed it.

Java documentation for android.view.View.setTranslationX(float).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to