Class ScrollRect
A
Namespace: Mux.Markup
Assembly: Mux.Markup.UI.dll
Syntax
public class ScrollRect : Behaviour<UnityEngine.UI.ScrollRect>
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 />
<m:RectTransform Body="{Binding Path=Viewport, Source={x:Reference Name=scrollRect}}">
<mu:RectMask2D />
<m:RectTransform Body="{Binding Path=Content, Source={x:Reference Name=scrollRect}}" X="{m:Sized SizeDelta=999}" Y="{m:Sized SizeDelta=999}">
<mue:UIMesh>
<mue:UIMesh.Items>
<mue:UIVertexTriangleStream>
<mue:UIVertexTriangleStream.Verts>
<m:UIVertex Color="{m:Color R=0, G=0, B=1}" Position="{m:Vector3 X=-0.5, Y=-0.5, Z=0}" />
<m:UIVertex Color="{m:Color R=0, G=1, B=0}" Position="{m:Vector3 X=0, Y=0.5, Z=0}" />
<m:UIVertex Color="{m:Color R=1, G=0, B=0}" Position="{m:Vector3 X=0.5, Y=-0.5, Z=0}" />
</mue:UIVertexTriangleStream.Verts>
</mue:UIVertexTriangleStream>
</mue:UIMesh.Items>
</mue:UIMesh>
</m:RectTransform>
</m:RectTransform>
<playgroundMarkup:ScrollbarTransform
Scrollbar="{Binding Path=HorizontalScrollbar, Source={x:Reference Name=scrollRect}}"
Direction="LeftToRight"
X="{m:Stretch}"
Y="{m:Sized Anchor=0, Pivot=0, SizeDelta=15}" />
<playgroundMarkup:ScrollbarTransform
Scrollbar="{Binding Path=VerticalScrollbar, Source={x:Reference Name=scrollRect}}"
Direction="BottomToTop"
X="{m:Sized Anchor=1, Pivot=1, SizeDelta=15}"
Y="{m:Stretch}" />
<mu:ScrollRect x:Name="scrollRect" HorizontalScrollbarSpacing="15" VerticalScrollbarSpacing="15" />
</m:RectTransform>
Fields
| Improve this Doc View SourceContentProperty
Backing store for the Content property.
Declaration
public static readonly BindableProperty ContentProperty
Field Value
Type | Description |
---|---|
BindableProperty |
HorizontalProperty
Backing store for the Horizontal property.
Declaration
public static readonly BindableProperty HorizontalProperty
Field Value
Type | Description |
---|---|
BindableProperty |
HorizontalScrollbarProperty
Backing store for the HorizontalScrollbar property.
Declaration
public static readonly BindableProperty HorizontalScrollbarProperty
Field Value
Type | Description |
---|---|
BindableProperty |
HorizontalScrollbarSpacingProperty
Backing store for the HorizontalScrollbarSpacing property.
Declaration
public static readonly BindableProperty HorizontalScrollbarSpacingProperty
Field Value
Type | Description |
---|---|
BindableProperty |
HorizontalScrollbarVisibilityProperty
Backing store for the HorizontalScrollbarVisibility property.
Declaration
public static readonly BindableProperty HorizontalScrollbarVisibilityProperty
Field Value
Type | Description |
---|---|
BindableProperty |
InertiaProperty
Backing store for the Inertia property.
Declaration
public static readonly BindableProperty InertiaProperty
Field Value
Type | Description |
---|---|
BindableProperty |
MovementProperty
Backing store for the Movement property.
Declaration
public static readonly BindableProperty MovementProperty
Field Value
Type | Description |
---|---|
BindableProperty |
NormalizedPositionProperty
Backing store for the NormalizedPosition property.
Declaration
public static readonly BindableProperty NormalizedPositionProperty
Field Value
Type | Description |
---|---|
BindableProperty |
ScrollSensitivityProperty
Backing store for the ScrollSensitivity property.
Declaration
public static readonly BindableProperty ScrollSensitivityProperty
Field Value
Type | Description |
---|---|
BindableProperty |
VerticalProperty
Backing store for the Vertical property.
Declaration
public static readonly BindableProperty VerticalProperty
Field Value
Type | Description |
---|---|
BindableProperty |
VerticalScrollbarProperty
Backing store for the VerticalScrollbar property.
Declaration
public static readonly BindableProperty VerticalScrollbarProperty
Field Value
Type | Description |
---|---|
BindableProperty |
VerticalScrollbarSpacingProperty
Backing store for the VerticalScrollbarSpacing property.
Declaration
public static readonly BindableProperty VerticalScrollbarSpacingProperty
Field Value
Type | Description |
---|---|
BindableProperty |
VerticalScrollbarVisibilityProperty
Backing store for the VerticalScrollbarVisibility property.
Declaration
public static readonly BindableProperty VerticalScrollbarVisibilityProperty
Field Value
Type | Description |
---|---|
BindableProperty |
ViewportProperty
Backing store for the Viewport property.
Declaration
public static readonly BindableProperty ViewportProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Properties
| Improve this Doc View SourceContent
A property that represents UnityEngine.UI.ScrollRect.content.
Declaration
public UnityEngine.RectTransform Content { get; set; }
Property Value
Type | Description |
---|---|
UnityEngine.RectTransform |
Remarks
Setting a value to this property rebuilds the layout.
Horizontal
A property that represents UnityEngine.UI.ScrollRect.horizontal.
Declaration
public bool Horizontal { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Setting a value to this property rebuilds the layout.
HorizontalScrollbar
A property that represents UnityEngine.UI.ScrollRect.horizontalScrollbar.
Declaration
public UnityEngine.UI.Scrollbar HorizontalScrollbar { get; set; }
Property Value
Type | Description |
---|---|
UnityEngine.UI.Scrollbar |
Remarks
Setting a value to this property rebuilds the layout.
See Also
| Improve this Doc View SourceHorizontalScrollbarSpacing
A property that represents UnityEngine.UI.ScrollRect.horizontalScrollbarSpacing.
Declaration
public float HorizontalScrollbarSpacing { get; set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Setting a value to this property rebuilds the layout.
HorizontalScrollbarVisibility
A property that represents UnityEngine.UI.ScrollRect.horizontalScrollbarVisibility.
Declaration
public UnityEngine.UI.ScrollRect.ScrollbarVisibility HorizontalScrollbarVisibility { get; set; }
Property Value
Type | Description |
---|---|
UnityEngine.UI.ScrollRect.ScrollbarVisibility |
Remarks
Setting a value to this property rebuilds the layout.
Inertia
A property that represents the movement inertia of UnityEngine.UI.ScrollRect.
Declaration
public Modifier Inertia { get; set; }
Property Value
Type | Description |
---|---|
Modifier |
Remarks
Setting
See Also
| Improve this Doc View SourceMovement
A property that represents the movement of UnityEngine.UI.ScrollRect.
Declaration
public Modifier Movement { get; set; }
Property Value
Type | Description |
---|---|
Modifier |
Remarks
Setting
See Also
| Improve this Doc View SourceNormalizedPosition
A property that represents UnityEngine.UI.ScrollRect.normalizedPosition.
Declaration
public UnityEngine.Vector2 NormalizedPosition { get; set; }
Property Value
Type | Description |
---|---|
UnityEngine.Vector2 |
ScrollSensitivity
A property that represents UnityEngine.UI.ScrollRect.scrollSensitivity.
Declaration
public float ScrollSensitivity { get; set; }
Property Value
Type | Description |
---|---|
Single |
Vertical
A property that represents UnityEngine.UI.ScrollRect.vertical.
Declaration
public bool Vertical { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
Setting a value to this property rebuilds the layout.
VerticalScrollbar
A property that represents UnityEngine.UI.ScrollRect.verticalScrollbar.
Declaration
public UnityEngine.UI.Scrollbar VerticalScrollbar { get; set; }
Property Value
Type | Description |
---|---|
UnityEngine.UI.Scrollbar |
Remarks
Setting a value to this property rebuilds the layout.
See Also
| Improve this Doc View SourceVerticalScrollbarSpacing
A property that represents UnityEngine.UI.ScrollRect.verticalScrollbarSpacing.
Declaration
public float VerticalScrollbarSpacing { get; set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
Setting a value to this property rebuilds the layout.
VerticalScrollbarVisibility
A property that represents UnityEngine.UI.ScrollRect.verticalScrollbarVisibility.
Declaration
public UnityEngine.UI.ScrollRect.ScrollbarVisibility VerticalScrollbarVisibility { get; set; }
Property Value
Type | Description |
---|---|
UnityEngine.UI.ScrollRect.ScrollbarVisibility |
Remarks
Setting a value to this property rebuilds the layout.
Viewport
A property that represents UnityEngine.UI.ScrollRect.viewport.
Declaration
public UnityEngine.RectTransform Viewport { get; set; }
Property Value
Type | Description |
---|---|
UnityEngine.RectTransform |
Remarks
Setting a value to this property rebuilds the layout.
Methods
| Improve this Doc View SourceAwakeInMainThread()
Declaration
protected override void AwakeInMainThread()
DestroyMuxInMainThread()
Declaration
protected override void DestroyMuxInMainThread()
OnBindingContextChanged()
Declaration
protected override void OnBindingContextChanged()