Show / Hide Table of Contents

Class RectTransform

A Transform<T> that represents UnityEngine.RectTransform and the game object it is attached to.

Inheritance
Object
BindableObject
Node
Component<UnityEngine.RectTransform>
Transform<UnityEngine.RectTransform>
RectTransform
Implements
INotifyPropertyChanged
IDynamicResourceHandler
ITransform
IEnumerable<Node>
Inherited Members
Transform<UnityEngine.RectTransform>.TransformsSourceProperty
Transform<UnityEngine.RectTransform>.TransformTemplateProperty
Transform<UnityEngine.RectTransform>.NameProperty
Transform<UnityEngine.RectTransform>.TagProperty
Transform<UnityEngine.RectTransform>.LayerProperty
Transform<UnityEngine.RectTransform>.LocalScaleProperty
Transform<UnityEngine.RectTransform>.LocalRotationProperty
Transform<UnityEngine.RectTransform>.LocalEulerAnglesProperty
Transform<UnityEngine.RectTransform>.ActiveSelfProperty
Transform<UnityEngine.RectTransform>.TransformsSource
Transform<UnityEngine.RectTransform>.TransformTemplate
Transform<UnityEngine.RectTransform>.Name
Transform<UnityEngine.RectTransform>.Tag
Transform<UnityEngine.RectTransform>.Layer
Transform<UnityEngine.RectTransform>.LocalScale
Transform<UnityEngine.RectTransform>.LocalEulerAngles
Transform<UnityEngine.RectTransform>.LocalRotation
Transform<UnityEngine.RectTransform>.ActiveSelf
Transform<UnityEngine.RectTransform>.Add(Node)
Transform<UnityEngine.RectTransform>.AddToInMainThread(UnityEngine.GameObject)
Transform<UnityEngine.RectTransform>.Destroy(Single)
Transform<UnityEngine.RectTransform>.DestroyImmediate(Boolean)
Component<UnityEngine.RectTransform>.BodyProperty
Component<UnityEngine.RectTransform>.CreateBindableModifierProperty(String, Type, BindableProperty.CreateDefaultValueDelegate)
Component<UnityEngine.RectTransform>.Body
Node.AddTo(UnityEngine.GameObject)
BindableObject.BindingContextProperty
Xamarin.Forms.BindableObject.add_PropertyChanging(Xamarin.Forms.PropertyChangingEventHandler)
Xamarin.Forms.BindableObject.remove_PropertyChanging(Xamarin.Forms.PropertyChangingEventHandler)
BindableObject.ClearValue(BindableProperty)
BindableObject.ClearValue(BindablePropertyKey)
BindableObject.GetValue(BindableProperty)
BindableObject.GetValues(BindableProperty, BindableProperty)
BindableObject.GetValues(BindableProperty, BindableProperty, BindableProperty)
BindableObject.IsSet(BindableProperty)
BindableObject.RemoveBinding(BindableProperty)
BindableObject.SetBinding(BindableProperty, BindingBase)
BindableObject.SetInheritedBindingContext(BindableObject, Object)
BindableObject.ApplyBindings()
BindableObject.OnPropertyChanged(String)
BindableObject.OnPropertyChanging(String)
BindableObject.UnapplyBindings()
BindableObject.IDynamicResourceHandler.SetDynamicResource(BindableProperty, String)
BindableObject.SetValue(BindableProperty, Object)
BindableObject.SetValue(BindablePropertyKey, Object)
BindableObject.SetValueCore(BindableProperty, Object, SetValueFlags)
BindableObject.CoerceValue(BindableProperty)
BindableObject.CoerceValue(BindablePropertyKey)
BindableObject.Dispatcher
BindableObject.BindingContext
BindableObject.PropertyChanged
BindableObject.PropertyChanging
BindableObject.BindingContextChanged
Namespace: Mux.Markup
Assembly: Mux.Markup.dll
Syntax
public class RectTransform : Transform<UnityEngine.RectTransform>, INotifyPropertyChanged, IDynamicResourceHandler, IInternalTransform, ITransform, IEnumerable<Node>
Examples
<m:RectTransform
    xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:m="clr-namespace:Mux.Markup;assembly=Mux.Markup"
    xmlns:mu="clr-namespace:Mux.Markup;assembly=Mux.Markup.UI"
    xmlns:mue="clr-namespace:Mux.Markup.Extras;assembly=Mux.Markup.UI"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:playgroundMarkup="clr-namespace:Mux.Playground.Markup;assembly=Assembly-CSharp">
    <!--
      Note that you can use "using" scheme instead of "clr-namespace" to omit assembly
      specification if:
      - the referenced type is in an assembly already loaded. (interpreter)
      - the referenced type is in the assembly containing the compiled XAML. (compiler)
    -->
    <mu:StandaloneInputModule />
    <mu:Canvas />
    <mu:CanvasScaler UiScale="{mu:ConstantPhysicalSize}" />
    <mu:GraphicRaycaster />
    <mu:Image Color="{m:Color R=0, G=0, B=1}" />
    <m:RectTransform X="{m:Stretch}" Y="{m:Sized SizeDelta=99}">
        <mu:Image Color="{m:Color R=0, G=1, B=0}" />
        <playgroundMarkup:TextTransform X="{m:Stretch}" Y="{m:Stretch}">
            <playgroundMarkup:TextTransform.Text>
The green RectTransform has Stretch X;
the width is determined by the blue RectTransform.

The green RectTransform has Sized Y;
the height is fixed to 99.
            </playgroundMarkup:TextTransform.Text>
        </playgroundMarkup:TextTransform>
    </m:RectTransform>
</m:RectTransform>

Constructors

| Improve this Doc View Source

RectTransform()

Declaration
public RectTransform()

Fields

| Improve this Doc View Source

LocalPositionZProperty

Backing store for the LocalPositionZ property.

Declaration
public static readonly BindableProperty LocalPositionZProperty
Field Value
Type Description
BindableProperty
| Improve this Doc View Source

XProperty

Backing store for the X property.

Declaration
public static readonly BindableProperty XProperty
Field Value
Type Description
BindableProperty
Remarks

Setting RectTransformLayout to this property binds its lifetime to the lifetime of this object.

| Improve this Doc View Source

YProperty

Backing store for the Y property.

Declaration
public static readonly BindableProperty YProperty
Field Value
Type Description
BindableProperty
Remarks

Setting RectTransformLayout to this property binds its lifetime to the lifetime of this object.

Properties

| Improve this Doc View Source

LocalPositionZ

A property that represents UnityEngine.Vector3.z of UnityEngine.Transform.localPosition.

Declaration
public float LocalPositionZ { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

X

A property that specifies the position in X axis and the width.

Declaration
public RectTransformLayout X { get; set; }
Property Value
Type Description
RectTransformLayout
See Also
Sized
Stretch
| Improve this Doc View Source

Y

A property that specifies the position in Y axis and the height.

Declaration
public RectTransformLayout Y { get; set; }
Property Value
Type Description
RectTransformLayout
See Also
Sized
Stretch

Methods

| Improve this Doc View Source

AwakeInMainThread()

A methot that actually wakes the node up in the main thread.

Declaration
protected override void AwakeInMainThread()
Overrides
Mux.Markup.Transform<UnityEngine.RectTransform>.AwakeInMainThread()
Remarks

The caller must call this method in the main thread after calling AddToInMainThread(UnityEngine.GameObject).

| Improve this Doc View Source

DestroyMuxInMainThread()

A method to destroy Mux state in the main thread.

Declaration
protected override void DestroyMuxInMainThread()
Overrides
Mux.Markup.Transform<UnityEngine.RectTransform>.DestroyMuxInMainThread()
Remarks

This method must be called in main thread because it may make operations queued for the main thread fail. For example, an application of binding will be queued for the main thread. That would fail if the binding is unapplied before the application.

| Improve this Doc View Source

OnBindingContextChanged()

Declaration
protected override void OnBindingContextChanged()
Overrides
Mux.Markup.Transform<UnityEngine.RectTransform>.OnBindingContextChanged()

Implements

System.ComponentModel.INotifyPropertyChanged
Xamarin.Forms.Internals.IDynamicResourceHandler
ITransform
IEnumerable<>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX