Show / Hide Table of Contents

Class Dropdown

A Selectable<T> that represents UnityEngine.UI.Dropdown.

Inheritance
Object
Selectable<UnityEngine.UI.Dropdown>
Dropdown
Inherited Members
Selectable<UnityEngine.UI.Dropdown>.InteractableProperty
Selectable<UnityEngine.UI.Dropdown>.TargetGraphicProperty
Selectable<UnityEngine.UI.Dropdown>.TransitionProperty
Selectable<UnityEngine.UI.Dropdown>.ColorsProperty
Selectable<UnityEngine.UI.Dropdown>.SpriteStateProperty
Selectable<UnityEngine.UI.Dropdown>.AnimationTriggersProperty
Selectable<UnityEngine.UI.Dropdown>.NavigationProperty
Selectable<UnityEngine.UI.Dropdown>.Interactable
Selectable<UnityEngine.UI.Dropdown>.TargetGraphic
Selectable<UnityEngine.UI.Dropdown>.Transition
Selectable<UnityEngine.UI.Dropdown>.Colors
Selectable<UnityEngine.UI.Dropdown>.SpriteState
Selectable<UnityEngine.UI.Dropdown>.AnimationTriggers
Selectable<UnityEngine.UI.Dropdown>.Navigation
Selectable<UnityEngine.UI.Dropdown>.AddToInMainThread(UnityEngine.GameObject)
Namespace: Mux.Markup
Assembly: Mux.Markup.UI.dll
Syntax
public class Dropdown : Selectable<UnityEngine.UI.Dropdown>
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: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 />
    <playgroundMarkup:TextTransform TextComponent="{Binding Path=CaptionText, Source={x:Reference Name=dropdown}}">
        <mu:ContentSizeFitter VerticalFit="PreferredSize" />
        <mu:Dropdown x:Name="dropdown">
            <mu:Dropdown.Options>
                <mu:DropdownOptionData Text="A" />
                <mu:DropdownOptionData Text="B" />
            </mu:Dropdown.Options>
        </mu:Dropdown>
        <m:RectTransform ActiveSelf="False" Body="{Binding Path=Template, Source={x:Reference Name=dropdown}}" X="{m:Stretch}" Y="{m:Sized AnchoredPosition=2, SizeDelta=150, Anchor=0, Pivot=1}">
            <m:RectTransform x:Name="viewport" X="{m:Stretch Pivot=0, OffsetMax=-18}" Y="{m:Stretch Pivot=1}">
                <m:RectTransform x:Name="content" Y="{m:Sized SizeDelta=28, Anchor=1, Pivot=1}">
                    <m:RectTransform X="{m:Stretch}" Y="{m:Sized SizeDelta=21}">
                        <mu:Toggle
                            Graphic="{Binding Path=Body, Source={x:Reference Name=itemGraphic}}"
                            TargetGraphic="{Binding Path=Body, Source={x:Reference Name=itemTargetGraphic}}" />
                        <mu:Image x:Name="itemTargetGraphic" />
                        <m:RectTransform X="{m:Stretch}" Y="{m:Stretch}">
                            <mu:Image x:Name="itemGraphic" Color="{m:Color R=0, G=0, B=1, A=0.5}" />
                        </m:RectTransform>
                        <playgroundMarkup:TextTransform
                            TextComponent="{Binding Path=ItemText, Source={x:Reference Name=dropdown}}"
                            X="{m:Stretch}"
                            Y="{m:Stretch}" />
                    </m:RectTransform>
                </m:RectTransform>
            </m:RectTransform>
            <mu:ScrollRect
                Viewport="{Binding Path=Body, Source={x:Reference Name=viewport}}"
                Content="{Binding Path=Body, Source={x:Reference Name=content}}" />
        </m:RectTransform>
    </playgroundMarkup:TextTransform>
</m:RectTransform>

Constructors

| Improve this Doc View Source

Dropdown()

Declaration
public Dropdown()

Fields

| Improve this Doc View Source

CaptionImageProperty

Backing store for the CaptionImage property.

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

CaptionTextProperty

Backing store for the CaptionText property.

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

ItemImageProperty

Backing store for the ItemImage property.

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

ItemTextProperty

Backing store for the ItemText property.

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

OptionsProperty

Backing store for the Options property.

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

You cannot add the same DropdownOptionData to this property of multiple instances.

This binds the lifetime of DropdownOptionData to the lifetime of the instance.

| Improve this Doc View Source

OptionsSourceProperty

Backing store for the OptionsSource property.

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

OptionTemplateProperty

Backing store for the OptionTemplate property.

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

TemplateProperty

Backing store for the Template property.

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

ValueProperty

Backing store for the Value property.

Declaration
public static readonly BindableProperty ValueProperty
Field Value
Type Description
BindableProperty

Properties

| Improve this Doc View Source

CaptionImage

A property that represents UnityEngine.UI.Dropdown.captionImage.

Declaration
public UnityEngine.UI.Image CaptionImage { get; set; }
Property Value
Type Description
UnityEngine.UI.Image
| Improve this Doc View Source

CaptionText

A property that represents UnityEngine.UI.Dropdown.captionText.

Declaration
public UnityEngine.UI.Text CaptionText { get; set; }
Property Value
Type Description
UnityEngine.UI.Text
| Improve this Doc View Source

ItemImage

A property that represents UnityEngine.UI.Dropdown.itemImage.

Declaration
public UnityEngine.UI.Image ItemImage { get; set; }
Property Value
Type Description
UnityEngine.UI.Image
| Improve this Doc View Source

ItemText

A property that represents UnityEngine.UI.Dropdown.itemText.

Declaration
public UnityEngine.UI.Text ItemText { get; set; }
Property Value
Type Description
UnityEngine.UI.Text
| Improve this Doc View Source

Options

A property that represents UnityEngine.UI.Dropdown.options.

Declaration
public ICollection<DropdownOptionData> Options { get; }
Property Value
Type Description
ICollection<DropdownOptionData>
Remarks

This is the content property; you can write as child elements in XAML.

| Improve this Doc View Source

OptionsSource

Gets or sets the source of options to template and display.

Declaration
public IEnumerable OptionsSource { get; set; }
Property Value
Type Description
IEnumerable
| Improve this Doc View Source

OptionTemplate

Gets or sets the to apply to the OptionsSource.

Declaration
public DataTemplate OptionTemplate { get; set; }
Property Value
Type Description
DataTemplate
| Improve this Doc View Source

Template

A property that represents UnityEngine.UI.Dropdown.template.

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

Value

A property that represents UnityEngine.UI.Dropdown.value.

Declaration
public int Value { get; set; }
Property Value
Type Description
Int32

Methods

| Improve this Doc View Source

AwakeInMainThread()

Declaration
protected override void AwakeInMainThread()
| 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