Class RectTransform
A Transform<T> that represents UnityEngine.RectTransform and the game object it is attached to.
Inheritance
Inherited Members
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 SourceRectTransform()
Declaration
public RectTransform()
Fields
| Improve this Doc View SourceLocalPositionZProperty
Backing store for the LocalPositionZ property.
Declaration
public static readonly BindableProperty LocalPositionZProperty
Field Value
Type | Description |
---|---|
BindableProperty |
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.
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 SourceLocalPositionZ
A property that represents UnityEngine.Vector3.z of UnityEngine.Transform.localPosition.
Declaration
public float LocalPositionZ { get; set; }
Property Value
Type | Description |
---|---|
Single |
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
| Improve this Doc View SourceY
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
Methods
| Improve this Doc View SourceAwakeInMainThread()
A methot that actually wakes the node up in the main thread.
Declaration
protected override void AwakeInMainThread()
Overrides
Remarks
The caller must call this method in the main thread after calling AddToInMainThread(UnityEngine.GameObject).
DestroyMuxInMainThread()
A method to destroy Mux state in the main thread.
Declaration
protected override void DestroyMuxInMainThread()
Overrides
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.
OnBindingContextChanged()
Declaration
protected override void OnBindingContextChanged()