Show / Hide Table of Contents

Class ScrollRect

A that represents UnityEngine.UI.ScrollRect.

Inheritance
Object
ScrollRect
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 Source

ContentProperty

Backing store for the Content property.

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

HorizontalProperty

Backing store for the Horizontal property.

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

HorizontalScrollbarProperty

Backing store for the HorizontalScrollbar property.

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

HorizontalScrollbarSpacingProperty

Backing store for the HorizontalScrollbarSpacing property.

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

HorizontalScrollbarVisibilityProperty

Backing store for the HorizontalScrollbarVisibility property.

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

InertiaProperty

Backing store for the Inertia property.

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

MovementProperty

Backing store for the Movement property.

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

NormalizedPositionProperty

Backing store for the NormalizedPosition property.

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

ScrollSensitivityProperty

Backing store for the ScrollSensitivity property.

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

VerticalProperty

Backing store for the Vertical property.

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

VerticalScrollbarProperty

Backing store for the VerticalScrollbar property.

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

VerticalScrollbarSpacingProperty

Backing store for the VerticalScrollbarSpacing property.

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

VerticalScrollbarVisibilityProperty

Backing store for the VerticalScrollbarVisibility property.

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

ViewportProperty

Backing store for the Viewport property.

Declaration
public static readonly BindableProperty ViewportProperty
Field Value
Type Description
BindableProperty

Properties

| Improve this Doc View Source

Content

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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
Scrollbar
| Improve this Doc View Source

HorizontalScrollbarSpacing

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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 to this property binds its lifetime to the lifetime of this object.

See Also
Inertia
| Improve this Doc View Source

Movement

A property that represents the movement of UnityEngine.UI.ScrollRect.

Declaration
public Modifier Movement { get; set; }
Property Value
Type Description
Modifier
Remarks

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

See Also
Unrestricted
Elastic
Clamped
| Improve this Doc View Source

NormalizedPosition

A property that represents UnityEngine.UI.ScrollRect.normalizedPosition.

Declaration
public UnityEngine.Vector2 NormalizedPosition { get; set; }
Property Value
Type Description
UnityEngine.Vector2
| Improve this Doc View Source

ScrollSensitivity

A property that represents UnityEngine.UI.ScrollRect.scrollSensitivity.

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

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.

| Improve this Doc View Source

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
Scrollbar
| Improve this Doc View Source

VerticalScrollbarSpacing

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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 Source

AwakeInMainThread()

Declaration
protected override void AwakeInMainThread()
| Improve this Doc View Source

DestroyMuxInMainThread()

Declaration
protected override void DestroyMuxInMainThread()
| Improve this Doc View Source

OnBindingContextChanged()

Declaration
protected override void OnBindingContextChanged()
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX